《JAVA 程序设计》复习题之(三)阅读程序题三、程序阅读题1.阅读以下程序import java.io.*;public class Reverse2 { public static void main(String args[ ]){int i,n=10; int a[] = new int[10]; try { BufferedReader br = new BufferedReader( new InputStreamReader(System.in)); a[i] = Integer.parseInt(br.readLine() ); } catch (IOException e) { }; for (i= n-1; i >= 0; i=i-2)System.out.print(a[i]+" "); System.out.println();}}请写出该程序的功能:该程序使用字符缓冲输入流从键盘输入 10 个数,然后倒序并间隔打印出来。2.阅读以下程序import java.io.* ;public class abc { public static void main(String args[ ]) { int i, s = 0 ; int a[] = { 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120 }; for ( i = 0 ; i< a.length ; i++ )if (i % 3 == 0) s += a[i];System.out.println("s=" + s);}}请写出该程序的输出结果:s=2603、阅读以下程序:import java.io.*;public class TestRandomAccess { public static void main(String args[]) { int data_arr[]={65,66,56,23,27,1,43,65,4,99}; try { RandomAccess RandomAccessFile("temp.dat","rw"); for (int i=0; i=0; i=i-2) { randf.seek(i*4); System,out.print(" "+randf.readInt()); randf.seek(40); System.out.println(randf.readUTF()); randf.close(); } catch (IOException e) { System.out.println(" error: "+e);} }}该程序的输出结果是:99 65 1 23 66 Good morning!4、阅读以下程序并填空。class _____________________ extends Exception { String mymsg="我自己定义的异常!"; double mynum = 2.0; MyException () { super("首字母不能为 A! ");} MyException (String msg){_____________ } //调用父类构造方法,参数为 msg public void displayme() { System.out.println(mymsg); } public double mymethod() { return Math.sqrt(mynum); }}class ExceptionTest { public static void main(String[] args) { try {...