Question: Hello, This is java, I don't understand this method, do we have change the variable str once then we have to have new string again,

Hello, This is java, I don't understand this method, do we have change the variable str once then we have to have new string again, do we do this each time, why we are having "new string"?

Hello, This is java, I don't understand this method, do we have

Many of the methods of a String object can create new versions of the object. String str = new String(I am "); str = "who am I; str = new String (!?!"); int strSize = str.length(); 1/3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!