In C#, Java, and Objective-C, String objects are immutable, meaning that after strings are created, they can't be changed. Therefore, the following code is illegal:String str1 = "abc";str1 = str1 + "123";

Answer the following statement true (T) or false (F)

False

String objects are immutable. They cannot be changed. However, the compiler recognizes this and uses temporary variables to move data out of one string into a new one. When the old variable space for str1 is no longer needed, it is destroyed. str1 is then assigned to the new space holding the string "abc123".

Computer Science & Information Technology

You might also like to view...

If the second argument in a message box is set to 4, the message displays Yes and No buttons

Indicate whether the statement is true or false

Computer Science & Information Technology

class secretType{public:  static int count;  static int z;  secretType();  secretType(int a);  void print();  static void incrementY();private:  int x;  static int y;};secretType::secretType(){  x = 1;}secretType::secretType(int a){  x = a;}void secretType::print(){  cout

A. none B. one C. two D. three

Computer Science & Information Technology