On long literals: because the number of digits you have written won't fit into an int. Because 1L is better than (long)1.
On float literals because 1f or 1.23f is better than (float)1.23.
On double literals: only worth doing if there is no decimal point, because 123d is better than (double)123.
One of the few places where
Java is case-insensitive, but always use upper-case L, never lower-case l on longs.