Answered step by step
Verified Expert Solution
Question
1 Approved Answer
) 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) { 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started