题目内容

已知数组数据为100、96、40、67、98、72、82,请使用选择排序完成升序排列并输出。public class MyArray {public static void main(String[] args) {_____(1)____score= {100,96,40,67,98,72,82};for(int i=0;i<____(2)_____;i++) {System.out.print(score [i]+" ");}for(int i=0;i<______(3)_________;i++) {for(int j=_____(4)____;j< score.length;j++) {if(score [i]> score [j]) {int temp= score [i];score [i]= score [j];score [j]=temp;}}}System.out.____(5)_____();//实现换行for(int i=0;i< score.length;i++) {System.out.print(score [i]+" ");}}}

查看答案
更多问题

下列程序的执行结果是_______________________。publicclassTest{_publicstaticvoidmain(String[] args) {float[] scores = newfloat[]{10,9,18,7,8,16,15,6,8,10};floatsum = 0;for(inti=0; i

应用程序Test.java的源程序如下,在命令行键入:java Test God helpsthose whohelpthemselves请分析程序的输出的结果,并写出答案:______________________________。publicclassTest {publicstaticvoidmain(String args[]) {intn1 = args.length;intn2 = args[5].length();System.out.print(n1 + " , " + n2);}}

如果局部变量的名字与成员变量的名字相同,则__________变量被隐藏。

在方法定义sqrt时,如果使用关键字________进行修饰,则该方法称为最终方法,能被子类继承,但不允许被子类覆盖/重写,也不允许被子类扩展。

答案查题题库