import java.io.*;
public class test
{
public static void main(String args[])
{
int a[]=new int[3];
String input; try{
for(int i=0;i<3;i++){
System.out.print("Please inter the "+(i+1)+"number: ");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
input=br.readLine();
a[i]=Integer.parseInt(input);
}
} catch (IOException e) {
System.err.println("IOException");
}
for(int j=0;j<3;j++){
System.out.println(a[j]);
}
}
}
public class test
{
public static void main(String args[])
{
int a[]=new int[3];
String input; try{
for(int i=0;i<3;i++){
System.out.print("Please inter the "+(i+1)+"number: ");
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
input=br.readLine();
a[i]=Integer.parseInt(input);
}
} catch (IOException e) {
System.err.println("IOException");
}
for(int j=0;j<3;j++){
System.out.println(a[j]);
}
}
}
解决方案 »
- jsp页面怎么显示换行的问题?
- Byte數組轉換成中文
- 继承问题
- 关于数据库查询出现Invalid state for getResultSet是什么问题,怎么解决。~~~急!!
- 怎样用一个表达式正则表达式统计字符串中英文字母,中文和日文的个数啊?
- SOAP client for TaskListener component(用GUI做的SOAP客户端的问题)
- 想学java我要用什么环境呀。提供下载地最好了。给分
- java.beans.Beans.instantiate的问题
- 急;数据库的问题
- To: ALL 我最近很有空在研究代码。谁和我一起啊????
- 连看三题我都不会,求教!谢谢!
- JDBC 2.0要下载才有吗?如果是,请问哪有, sun上怎么没有
这个关于整形的:Interger.parseInt(Input)是什么意思啊?