Java OCA OCP Practice Question 672

Question

What is not true about a String?

  • A. It can be created without coding a call to a constructor.
  • B. It can be reused via the string pool.
  • C. It is final.
  • D. It is mutable.


D.

Note

A String can be created using a literal rather than calling a constructor directly.

Option A incorrect.

A string pool exists for String reuse, making Option B incorrect.

A String is final and immutable, making Option C incorrect and Option D correct.




PreviousNext

Related