Describe the effect of the following Java statements You are

Describe the effect of the following Java statements You are required to make your post and respond to 2 of your peers on 3 different days to receive fun credit. Your reply to your peers MUST include their NAME to receive full credit. Your post was a comprehensive listing of computer components...

Solution

String name;
name = new String(\"Java Programming\");   //An instance of String object is created, and the value Java Programming is stored in it, and is assigned to the String variable name.
name = new String(\"Java Programming\"); //Another instance of String object is created, and the value Java Programming is stored in it, and is re-assigned to the String variable name.
name = new String(\"Java Programming\");   //One more instance of String object is created, and the value Java Programming is stored in it, and is re-assigned to the String variable name.

Ofcourse, the last 2 statements are redundant to the human eye, but actually, 3 instances will be created by the Java interpreter, but only the last instance is accessible by the variable name.

 Describe the effect of the following Java statements You are required to make your post and respond to 2 of your peers on 3 different days to receive fun credi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site