Single Choice Moderate

QWhich is NOT a primitive type in Java?

ID: #25885 MCQ Quiz - Class 8 - Programming 5 views
Question Info
#25885Q ID
ModerateDifficulty
MCQ Quiz - Class 8 - ProgrammingTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A String
  • B int
  • C char
  • D double
Correct Answer

Explanation

Correct Answer Explanation:

String is a CLASS (reference type), not a primitive. Java's 8 primitives are: byte, short, int, long, float, double, char, boolean.

Why the other options are incorrect:

  • Option B: int IS a primitive type.
  • Option C: char IS a primitive type.
  • Option D: double IS a primitive type.

Share This Question

Challenge a friend or share with your study group.