Which of the following is a valid long literal?
A. ABH8097
B. L990023
C. 904423
D. 0xnf029L
Answer:D
Which of the following is a valid long literal?
A. ABH8097 B. L990023 C. 904423 D. 0xnf029L
Explanation: For every long literal to be recognized by Java, we need to add L character at the end of the expression. It can be either uppercase (L) or lowercase (l) character. However, it is recommended to use uppercase character instead of lowercase because the lowercase (l) character is hard to distinguish from the uppercase (i) character.