Question PRG-JAVA-0009
MediumWhat is the output of this program?
public class Main {
public static void main(String[] args) {
String a = "java";
String b = new String("java");
System.out.println((a == b) + " " + a.equals(b));
}
}
- A.
true true
- B.
false true
- C.
Sign up free to see the answer and a step-by-step explanation.