文档介绍:java 程序输出结果为______。
1
2
3
4
int i=0;
Integer j = new Integer(0);
(i==j);
((i));
true,false
true,true
false,true
false,false
对于不同的环境结果不同
程序无法执行
。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
public class Example{
    String str=new String("hello");
    char[]ch={'a','b'};
    public static void main(String args[]){
        Example ex=new Example();
        (,);
        (+" and ");
        ();
    }
    public void change(String str,char ch[]){
        str="test ok";
        ch[0]='c';
    }
}
hello and ab
hello and cb
hello and a
test ok and ab
test ok and cb
test ok and c
。
1
public class TestClass {
2
3
4
5
6
7
8
   private static void testMethod(){
        ("testMethod");
   }
   public static void main(String[] args) {
        ((TestClass)null).testMethod();
   }
}
编译不通过
编译通过,运行异常,报NullPointerException
编译通过,运行异常,报IllegalArgumentException
编译通过,运行异常,报NoSuchMethodException
编译通过,运行异常,报Exception
运行正常,输出testMethod
()
装饰模式
合成模式
桥接模式
适配器
,执行后的结果是()
1
2
3
4
map=new ();  
("name",null);       
("name","Jack"); 
(