Question: Predict the output of the below code: String value 1 = Hello; String value 2 = new String ( Hello ) ; System.out.print ( value

Predict the output of the below code:
String value1= "Hello";
String value2= new String( "Hello");
System.out.print (value1=- value2);
System.out.print("");
String value3= value2. intern();
System.out.printin(value1== value3);
false false
false true
true true
true false
 Predict the output of the below code: String value1= "Hello"; String

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!