首页 > 试题广场 >

以下代码的输出是什么? 1 public class Te

[问答题]
以下代码的输出是什么?
1 public class Test { 
2 public static void main (String[] args) { 
3 int list[]
=
{1, 2 , 3. 4, 5 , 6}; 
4 for (int i = 1; i < list.length ; i++)
 5 list[i] = list[i
- 1]; 
6
 7 for (int i = 0; i < list.length ; i ++) 
8 System.out.printflist[i] + “ ”);
 9 } 
10 } 

这道题你会答吗?花几分钟告诉大家答案吧!