In Java 3 = 12.. | SJB -->

This website uses cookies to ensure you get the best experience. More info...

Pages

In Java 3 = 12..

In Java, the output of the below statement is 3 = 12


1
System.out.println(1 2 " = " 1 2);

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