In Java 3 = 12..

In Java, the output:  
    System.out.println(1 + 2 + " = " + 1 + 2);
    => 3 = 12

Why??
Because Java starts treating everything as a String once it has found a string in System.out statement. Interesting, huh...

No comments:

Post a Comment