灼眼的夏娜一缓存:java stream 问题

来源:百度文库 编辑:高校问答 时间:2024/04/29 05:50:49
public static void main(String args[]) throws IOException {
int i;
DataInputStream fin;
try{
fin=new DataInputStream(System.in);
System.out.println("please input");
i=fin.read();
System.out.print((char)i);
fin.close();
}
catch(Exception e){
System.out.println("File not found");
}

}
为什么只能打出一个, 怎么才能全打出来啊?????
String i 可以 谢谢你拉

试试
char i;
....
i=fin.readLine();