thistest.java

来自「还不错的java基本实例」· Java 代码 · 共 25 行

JAVA
25
字号

/**
 * Created by IntelliJ IDEA.
 * User: shaohj
 * Date: 2005-8-31
 * Time: 16:00:09
 * To change this template use File | Settings | File Templates.
 */
import javax.swing.JOptionPane;
import java.text.*;
public class ThisTest {
    public static void main(String[] args) {
        Employee Employee1=new Employee("王强",8000);
         Employee Employee2=new Employee("李宏",5000);
         Employee Employee3=new Employee("张非",6000);
        String output=Employee1.tellAboutSelf()+"\n" ;
        output +=Employee2.tellAboutSelf()+"\n";
          output +=Employee3.tellAboutSelf()+"\n";
         //在消息框中显示字符串output
              JOptionPane.showMessageDialog( null,output,
                      "结果",+JOptionPane.INFORMATION_MESSAGE);
              System.exit(0);
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?