Predict the output of the program?
And how many objects are created in this program ?

public class StringComparison
{
public static void main(String[] args)
{
String str1=new String("Scaler");
String str2=new String("Scaler");
System.out.println(str1 == str2);
System.out.println(str1.equals(str2));
}
}

Posted on by