1.

What is the output of this program?

public class output
{
public static void main(String args[])
{
String str1 = "Hello i love interview mania";
String str2 = new String(str1);
System.out.println((str1 == str2) + " " + str1.equals(str2));
}
}

A. false true
B. true false
C. true
D. false
E. None of these
Answer» B. true false


Discussion

No Comment Found

Related MCQs