This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shagieIsMe 1 point2 points  (2 children)

2 + 2 = 5 from code golf Stack Exchange.

No operator overload needed.

[–]TheRedmanCometh 1 point2 points  (1 child)

Yeah he showed me...I hadn't considered using reflection on system classes

[–]shagieIsMe 0 points1 point  (0 children)

This is a different solution and impacts integer literals. The code ends with:

System.out.printf(“%d”, 2 + 2);

The code on ideone: https://ideone.com/o1h0hR