1.

Which is a true statement for object of String class?(a) Object are immutable(b) Object are mutable(c) Object are created only once(d) Object can’t be createdI had been asked this question in a national level competition.The origin of the question is String Class topic in chapter Inbuilt Classes of Object Oriented Programming

Answer»

The correct option is (a) Object are IMMUTABLE

The explanation is: The object of string class are mostly immutable. This means that the String objects are CONSTANT. These can’t be CHANGED once created.



Discussion

No Comment Found

Related InterviewSolutions