String representation in Java

后端 未结 3 1709
执念已碎
执念已碎 2021-01-25 05:02

A String is represented as objects in Java. Accordingly, an object contains values stored in instance variables within the object. An object also contains bodies of cod

3条回答
  •  甜味超标
    2021-01-25 05:26

    Strings are immutable in Java, so when you do a println, a new String is created by the toUpperCase (and later garbage collected).

提交回复
热议问题