A

Admin • 832.27K Points
Coach

Q. What will be the output of the following program?

Code:
public class Test{
public static void main(String args[]){
String s1 = "java";
String s2 = "java";
System.out.println(s1.equals(s2));
System.out.println(s1 == s2);
}
}
  • (A) false true
  • (B) false false
  • (C) true false
  • (D) true true
  • Correct Answer - Option(D)
  • Views: 19
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.