日期:2014-05-20 浏览次数:20810 次
Java代码  
1.public static void main(String[] args) throws Exception {   
2.    int[] x = new int[6];   
3.    Arrays.fill(x, 1);   
4.    for (int i = 0; i < x.length; i++) {   
5.        System.in.read();   
6.        System.out.println(x[i]);   
7.    }   
8.}  
public static void main(String[] args) throws Exception { 
int[] x = new int[6]; 
Arrays.fill(x, 1); 
for (int i = 0; i < x.length; i++) { 
System.in.read(); 
System.out.println(x[i]); 
} 
}这段代码,输入“1”(不含引号),按回车后,系统输出什么? 
Java代码  
1.private static void foo() {   
2.    try {   
3.        System.out.println("try");   
4.        foo();   
5.    } catch (Throwable e) {   
6.        System.out.println("catch");   
7.        foo();   
8.    } finally {   
9.        System.out.println("finally");   
10.        foo();   
11.    }   
12.}   
13.  
14.public static void main(String[] args) {   
15.    foo();   
16.}  
private static void foo() { 
try { 
System.out.println("try"); 
foo(); 
} catch (Throwable e) { 
System.out.println("catch"); 
foo(); 
} finally { 
System.out.println("finally"); 
foo(); 
} 
} 
public static void main(String[] args) { 
foo(); 
}
Java代码 1.A = 1; 2.System.out.println(A);?
?