Answer (Choose 1 answer)
What is the output when you try to compile and run the following program?
import java.util.*;
public class Main{
public static void main(String argv[]){String x = "ABC$PQUV";
B. ABC true
int k = x.indexOf("$");
C. AB true
String y = x.substring(0,k);String z = new String(new char[] {'A', 'B', 'C'});
D. ABCP true
System.out.print(y + " ");
System.out.println(y.equals(z));
}
A. ABC false
E. ABCP false
Exit 28