Multiple choice

Which of the following does not represent a character literal in Java?

  1. 'c'

  2. 'r'

  3. 'n'

  4. a

  5. '5'

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Though it is a digit, it is treated as a character because of single quotes. It is treated as a string in Java.