📄 main3.java
字号:
/*
* main3.java
*
* Created on 2007年4月17日, 下午10:25
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package work;
import javax.swing.*;
public class main3
{
static int i=0;
public static void main(String[]args)
{
Employee person=new Employee();
boolean p=false;
String name;
name=JOptionPane.showInputDialog("Input your name:");
person.setName(name);
do
{
p=false;
person.addExpense(ExpenseFactory.createExpense());
int response2 = JOptionPane.showConfirmDialog( null, "Do you want to addExpense?", "Clik yes or not!", JOptionPane.OK_CANCEL_OPTION );
if (response2 == JOptionPane.YES_OPTION){
p=true;
}
}while(p);
System.out.println(person.getName());
System.out.println(person.toString());
System.out.println("---------------------------");
System.out.print(person.toSum());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -