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) +
else
System.out.println((abc == xyz) +
}
+ abc.equals(xyz));
1
+ abc.equals(xyz));
a. 10
Answers
Answered by
3
Answer:
Codiva. Codiva.io is our top pick for online Java compiler. ...
JDoodle. JDoodle is a popular online compiler for Java. ...
Rextester. Rextester started as a Regular Expression Tester, later grew to be an online IDE. ...
OnlineGDB. Online GDB is the onli
Similar questions