选择题:阅读以下说明和Java代码,将应填入(n)处的字句写在对应栏内。[说明] 编写一个字符界面的Java Appli

  • 题目分类:软考初级
  • 题目类型:选择题
  • 查看权限:VIP
题目内容:
阅读以下说明和Java代码,将应填入(n)处的字句写在对应栏内。

[说明]

编写一个字符界面的Java Application 程序,接受用户输入的10个整数,并输出这10个整数的最大值和最小值。

[Java 代码]

import java. io.* ;

public class abc

{

public static void main ((1))

{int i, n=10, max=0, min=0, temp=0;

try {

BufferedReader br = new BufferedReader (

new InputStreamReader ( System.in ) );

max = min =Integer. parselnt ( br. readLine ( ) );

}. (2) ( IOExccption e ) {} ;

for ( i=2 ; i<=n ; i++ ) {

try {

BufferedReader br = new (3) (

new InputStreamReader ( System. in ) );

temp =(4) ( br. readLine ( ));

if (temp>max ) max=temp;

if (temp<min) (5)

} catch (IOException e ) {};

}

System.out.println ( "max="+max+"\nmin="+min );

}

}




参考答案:

● ___(68)___ are those programs that help find the information you are trying to locate on

● ___(68)___ are those programs that help find the information you are trying to locate on

查看答案

● 对同一段音乐可以选用 MIDI 格式或 WAV格式来记录存储。 以下叙述中, (13) 是不正确的。 (13)A.W

● 对同一段音乐可以选用 MIDI 格式或 WAV格式来记录存储。 以下叙述中, (13) 是不正确的。 (13)A.W

查看答案

阅读以下说明和Java代码。[说明] 已知类Stock和类JavaMain都定义在JavaMain.java文件中,类Stock的

阅读以下说明和Java代码。[说明] 已知类Stock和类JavaMain都定义在JavaMain.java文件中,类Stock的

查看答案

阅读下列程序说明和C代码,将应填入(n)处的字句写在对应栏内。[说明] 函数Printprime(int UpBound)

阅读下列程序说明和C代码,将应填入(n)处的字句写在对应栏内。[说明] 函数Printprime(int UpBound)

查看答案

阅读下列程序说明和C代码,回答问题1~2。[说明] 本程序用古典的Eratosthenes的筛法求从2起到指定范

阅读下列程序说明和C代码,回答问题1~2。[说明] 本程序用古典的Eratosthenes的筛法求从2起到指定范

查看答案