题目
A.ch= System.in.read();
B.ch=(char)Systcm in.read();
C.ch=(char)System.in.readln();
D.ch=(int)System in.read();
第1题
A.ch=System.in.read();
B.ch=(char)System.in.read();
C.ch=(char)System.in.readln();
D.ch=(int)System.in.read();
第2题
A. ch=System.in.read:
B.ch=(char)System.in.read:
C.ch=(char)System.in.readln:
D.ch=(int)System.in.read;
第3题
第4题
A.ch = System.in.read();
B.ch = (char)System.in.read();
C.ch = (char)System.in.readln();
D.ch = (int)System.in.read();
第5题
阅读以下说明和Java代码,将应填入(n)处的字句写在对应栏内。
【说明】
下面程序完成从键盘读入一个字符串,然后采用parseInt方法将其转换为一个相应的整数。
import java.io.*;
public class testThrows{
public static (1) readString() (2) IOException{
int ch;
String r="";
boolean done=false;
while((3)){
ch=System.in.read();
if(ch<0 || ch=0xd) //处理回车符中第一个符号
done=true;
else
r=r+(char)ch;
}
return r;
}
public static void main(Stling args[]){
String str;
(4) {
str=readString();
} (5) (IOException e){
System.out.println("error");
return;
}
System.out.println("input integer: "+Integer.parselnt(str));
}
}
为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!