NoLongLiterals

Misconception:

Java does not provide a way to directly write numbers of type long. Values of type long can only be created by casting, e.g., (long)123456789.

Incorrect

There are no long literals

Correct

An L or l suffix can turn a number into a long literal

Correction
Here is what's right.

Java does have long literals. The suffix l or L denotes a long literal. Some examples of Java long literals:

1L
1234l

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.