Given the code fragment:
Which code fragment, when inserted at line n1, enables the App class to print Equal?
A. Option A
B. Option B
C. Option C
D. Option D
Given the code fragment:
Which code fragment, when inserted at line n1, enables the App class to print Equal?
A. Option A
B. Option B
C. Option C
D. Option D
B
public static void main(String[] args) {
String str1 = “JAVA”;
String str2 = new String (“java”);
if (str1.equalsIgnoreCase(str2)){
System.out.println(“Equal”);
}else {
System.out.println(“Not Equal”);
}
}