MCQ
What is specified if string objects Str1 and Str2 are created using same string literal but without using “new” operator?
  • It compares the content of two reference variables.
  • B
    It compares the objects of two reference variables.
  • C
    a and b both
  • D
    None of these

Answer

Correct option: A.
It compares the content of two reference variables.
It compares the content of two reference variables.

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free