• 2022-07-23 问题

    请阅读下面的程序 public class Test { public static void main(String[] args) { int a = { 2, 0, 4, 1, 8, 3, 5 }; int temp; for (int i = 0; i < a.length - 1; i++) { for (int j = a.length - 1; j > i; j--) { if (aj < aj - 1) { temp = aj; aj = aj - 1; aj - 1 = temp; } } } for (Integer i : a) { System.out.print(i); } }} 下列选项中,哪个是程序的运行结果() A: 8543210 B: 0123458 C: 2041835 D: 以上答案都不对

    请阅读下面的程序 public class Test { public static void main(String[] args) { int a = { 2, 0, 4, 1, 8, 3, 5 }; int temp; for (int i = 0; i < a.length - 1; i++) { for (int j = a.length - 1; j > i; j--) { if (aj < aj - 1) { temp = aj; aj = aj - 1; aj - 1 = temp; } } } for (Integer i : a) { System.out.print(i); } }} 下列选项中,哪个是程序的运行结果() A: 8543210 B: 0123458 C: 2041835 D: 以上答案都不对

  • 2022-07-23 问题

    请阅读下面的程序 [br][/br]public class Test { [br][/br] public static void main(String&#91;&#93; args) { [br][/br] int a = { 2, 0, 4, 1, 8, 3, 5 }; [br][/br] int temp;[br][/br] for (int i = 0; i &#91; a.length - 1; i++) { <br&#93; for (int j = a.length - 1; j > i; j--) {[br][/br] if (aj &#91; aj - 1) { <br&#93; temp = aj; [br][/br] aj = aj - 1; [br][/br] aj - 1 = temp; [br][/br] }[br][/br] }[br][/br] }[br][/br] for (Integer i : a) {[br][/br] System.out.print(i); [br][/br] }[br][/br] }[br][/br]} [br][/br]下列选项中,哪个是程序的运行结果() A: 8543210 B: 0123458 C: 2041835 D: 以上答案都不对

    请阅读下面的程序 [br][/br]public class Test { [br][/br] public static void main(String&#91;&#93; args) { [br][/br] int a = { 2, 0, 4, 1, 8, 3, 5 }; [br][/br] int temp;[br][/br] for (int i = 0; i &#91; a.length - 1; i++) { <br&#93; for (int j = a.length - 1; j > i; j--) {[br][/br] if (aj &#91; aj - 1) { <br&#93; temp = aj; [br][/br] aj = aj - 1; [br][/br] aj - 1 = temp; [br][/br] }[br][/br] }[br][/br] }[br][/br] for (Integer i : a) {[br][/br] System.out.print(i); [br][/br] }[br][/br] }[br][/br]} [br][/br]下列选项中,哪个是程序的运行结果() A: 8543210 B: 0123458 C: 2041835 D: 以上答案都不对

  • 1