Question PRG-JAVA-0001
MediumWhat is the output of this code?
String s1 = "hello";
String s2 = "hello";
System.out.println(s1 == s2);
- A.
true
- B.
false
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
What is the output of this code?
String s1 = "hello";
String s2 = "hello";
System.out.println(s1 == s2);
true
false
Sign up free to see the answer and a step-by-step explanation.
Compilation error
Runtime error