【JAVA】输入输出方法

输出:

The showMessageDialog Method:

JOptionPane.showMessageDialog(null,
"Welcome to Java!",
“Display Message
",
JOptionPane.INFORMATION_MESSAGE));

输入:

1.showInputDialog

firstNumber = JOptionPane.showInputDialog( "Enter first integer:");

2.Scanner

Scanner input = new Scanner(System.in);
balance
=input.nextDouble();

posted on 2011-05-31 08:22  张小捷  阅读(234)  评论(0编辑  收藏  举报

导航