多选题 Given:
3. class Stereo {void makeNoise() {assert true; } }
4. public class BoomBox2 extends Stereo {
5. public static void main(String[] args) {
6. new BoomBox2() .go(args);
7. }
8. void go(String[] args) {
9. if(args.length > 0) makeNoise();
10. if(args[0] .equals("x")) System.out.print("x ");
11. if(args[0] == "x") System.out.println("x2 ");
12. } }
And (if the code compiles), the invocation:
java -ea Boombox2 x
What is the result?
【正确答案】 C
【答案解析】