Question: What is the output of the following code? class Main { public static void main(String args[]) String abc = Welcome to Chegg; String xyz
What is the output of the following code? class Main { public static void main(String args[]) String abc = "Welcome to Chegg"; String xyz = new String(abc); if (abc == xyz) System.out.println((abc == xyz) + " " + abc.equals (xyz)); %3D else + abc.equals (xyz)); System.out.println((abc == xyz) + } } . 1 0 b. 0 true c. false true d. true true
Step by Step Solution
3.41 Rating (151 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
