0

Why does the statement (1_0 == 10) evaluate to true?

Saw this in a challenge and I was really confused that this statement evaluates to true. Tried it only in Java so idk if it works in other languages to, therefore the Java tag.

15th May 2019, 3:41 PM
Daniel Möhring
Daniel Möhring - avatar
1 Odpowiedź
+ 3
_ (in java) is used just for the purpose of increasing readability. eg- like in real life we can write 1000 as 1,000 ( , here doesn't mean anything)
15th May 2019, 4:07 PM
kiRA
kiRA - avatar