设有如下程序,其调试结果为: class Q2 { public static ...t(' '+seeds[i]); } }
举一反三
- 以下代码的调试结果为?以下程序的运行结果为 public class test { public static void main(String args[]) { int i = 1; do { i--; } while (i > 2); System.out.println(i); } }
- 设有如下程序: public class Test5 { public stat..."The end"); } } 结果为?
- 以下程序的运行结果为? class Test2{ public static void main(String[] args) { int[] seeds = {1,2,3,5}; int n = seeds.length; for (int i = 0; i < 2; i++) for (int k = 0; k< n-1; k++) seeds[k]= seeds[k+1]; for (int i = 0; i 输出: 3 5 5 5
- 以下程序调试结果 public class test { public static void main(String args[]) { int i=1, j=3; while (j>0) { j--; i++; } System.out.println(i); } }
- 设有如下程序: public class Test5 { public static void main (String args []) { /* This is the start of a comment if (true) { Test5 = new test5(); System.out.println("Done the test"); } /* This is another comment */ System.out.println ("The end"); } } 结果为?