Multiple choice

Which of the following statements is true?

  1. The default char data type is a space( ' ' ) character.

  2. The default integer data type is 'int' and real data type is 'float'

  3. The default integer data type is 'long' and real data type is 'float'

  4. The default integer data type is 'int' and real data type is 'double'

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

Java has default types for numeric literals. Integer literals (like 42) are int by default. Floating-point literals (like 3.14) are double by default. Option D correctly states both defaults.