Question: ) 7) public class Example17 { public static void main(String[] args) { String oc. hello; String o1 = new String(oc); String o2 = new String(hello);

 ) 7) public class Example17 { public static void main(String[] args)

) 7) public class Example17 { public static void main(String[] args) { String oc. "hello"; String o1 = new String(oc); String o2 = new String("hello"); if (01 - 0) { System.out.println("o1-roc"); } if (02 - 0) { System.out.println("02-roc"); } if (01.equals(oc)) { System.out.println("o1 equals to oc"); } if (02.equals(oc)) { System.out.println("o2 equals to oc"); }

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!