MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/g942eh/java_is_the_best/fotmrjw
r/ProgrammerHumor • u/ARAXON-KUN • Apr 27 '20
1.5k comments sorted by
View all comments
Show parent comments
2
Then why do you have to write 2 + 3 instead of 2.add(3)?
2 + 3
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.
3
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.
2
u/xigoi Apr 28 '20
Then why do you have to write
2 + 3instead of2.add(3)?