OD
(Choose 1 answer)
A. NOT EQUAL
B. EQUAL
C. There is a compile error in the program.
D. EQUAL NOT EQUAL
What is the output when you try to compile and run the following program?
public class Main {
public static void main(String argv[]){
String s = "Hi there";int pos = s.indexOf(" ");
String r = s.substring(0, pos);
String s2 = new if(r.equals(s2))String(new char[] {'H',''});
System.out.println("EQUAL");
else System.out.println("NOT EQUAL");
System.out.println();
}