What is the output of the following program?
class ExamPrep {
public static void main(String[] args){
String a = new String("Java");
String b = new String("Java");
if (a == b) {
System.out.println("They are equal");
} else {
System.out.println("They are not equal");
}
}
} Choose the correct answer:
A. They are equal
B. They are not equal
C. This program will not compile
D. This program will fail with an exception at runtime