In Java 3 = 12

And then, after all that bashing of PHP being ugly and unpredictable, here comes this:

System.out.println(1 + 2 + " = " + 1 + 2);
// Output:
3 = 12

I understand why this happens, and how to work around it. ┬áBut I wasn’t expecting something as … simple … from the oh magestic Java.

Leave a Comment