【文章內(nèi)容簡介】
public static void main(String args[ ]) { int i , n =10 。 int a[ ] = new int[10]。 for ( i = 0 。 i n 。 i ++ ) try { BufferedReader br = new BufferedReader( new InputStreamReader())。 a[i] = (( ))。 // 輸入一個整數(shù) } catch ( IOException e ) { } 。 for ( i = n-1 。 i = 0 。 i ―― ) (a[i]+ )。 ( )。 } } import .*。 public class abc { public static void main(String args[]) { new FrameOut()。 } } class FrameOut extends Frame // Frame為系統(tǒng)定 { Button btn。 // 義的窗框類 FrameOut( ) { super(按鈕)。 btn = new Button(按下我)。 setLayout(new FlowLayout( ))。 add(btn)。 setSize(300,200)。 show( )。 } }import .*。 public class abc { public static void main(String args[]) { SubClass sb = new SubClass( )。 (( ))。 } } class SuperClass { int a = 10 , b = 20 。 } class SubClass extends SuperClass { int max( ) { return ((ab)?a:b)。 } }四、寫出下面程序的運行結(jié)果(每小題10分,共30分) import .*。public class abc{ public static void main(String args[ ]) { AB s = new AB(Hello!,I love JAVA.)。 (( ))。 }}class AB { String s1。 String s2。 AB( String str1 , String str2 ) { s1 = str1。 s2 = str2。 } public String toString( ) { return s1+s2。}} import .* 。 public class abc { public static void main(String args[ ]) { int i , s = 0 。 int