java技术博客

jsp博客
数据加载中……
InputTest.java
/**
*读取键盘输入
*/
import javax.swing.JOptionPane;
public class InputTest{
public static void main(String[] args){
String strName=JOptionPane.showInputDialog("Input your name:");
String strAge=JOptionPane.showInputDialog("Input your age:");
int age=Integer.parseInt(strAge);
System.out.println("Welcome you :"+strName);
System.out.println("你还有"+(60-age)+"年可以退休了!!");
System.exit(0);
}
}

posted on 2008-10-22 13:30 郭兴华 阅读(130) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: