Programming Language String in Java Question #2212
Single Choice Not Set

QWhat will be the output of the following program?
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); 
        }
}

ID: #2212 String in Java 1,256 views
Question Info
#2212Q ID
Not SetDifficulty
String in JavaTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A false true
  • B false false
  • C true false
  • D true true
Correct Answer

Explanation

true true

Share This Question

Challenge a friend or share with your study group.