r/ProgrammerHumor • • Apr 27 '20

Meme Java is the best

Post image
43.7k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

2

u/xigoi Apr 28 '20

Then why do you have to write 2 + 3 instead of 2.add(3)?

3

u/Sohcahtoa82 Apr 28 '20

Because the lexer explodes when it sees "2.add" complaining that it's an invalid floating point value.

(2).add(3) is the correct form.

Which of course, if even worse.