What is the output of the following code snippet?

What will be the output of the following code snippet?
Additional Details

Object s1 = new String(“Hello”);
Object s2 = new String(“Hello”);

if(s1 == s2) {
System.out.println(“s1 and s2 are ==”);
}else if (s1.equals(s2)) {
System.out.println(“s1 and s2 are equals()”);
}

Answer:

s1 and s2 are equals()

 

What is the output of the following code snippet?

Read more: Heaviest noble gas

Follow:
Allen is a Technology guy, He basically works on Top articles related to Technology, Gadgets, and more. To know more about his work.