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)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3b90f3379a_65466f3b90eb83cc.jpg)
) 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
Get step-by-step solutions from verified subject matter experts
