HCl Interview Question 3+ experience ?

 HCL Interview Question ? What is the Output of this Program?

Program:

public class Test1 {

public static void main(String[] args) {
String str1=new String("Test");
String str2="TEST";
System.out.println(str1==str2);
System.out.println(str1.equals(str2));

}

}

**********************************************************

O/P :-  false
            false

Comments

Popular posts from this blog

How to create React project using command prompt?

How to achieve abstraction?

Interview Question? How to find square of each element in this Array {2,4,5,6,8} using map ?