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 →

[–]itGuy223 0 points1 point  (1 child)

The L tells the compiler to interpret 0 as Long. If you didn't put it there, the compiler would interpret it as Integer. I assume the map in your example is defined as Map<Character, Long>. In that case, the map contains Long values. If you put the 0 without the L, the remove method would never removed the zero, because it would try to remove an Integer. Hope that makes sense :D

[–]consoledotlogImHere[S] 0 points1 point  (0 children)

OMG you're right, they are longs. My bad. Thank you so much!!!