This book "
Java™ Puzzlers: Traps, Pitfalls, and Corner Cases"
gives insight into some Java "fails" that one needs to watch out for when developing.
It explains what is wrong with this piece of code (It doesn't print out AB as one would expect):
public class PrintingSomeLetters {
public static void main(String[] args) {
System.out.println('A' + 'B');
}
}
No comments:
Post a Comment