📄 test.java
字号:
//package Per;
public class Test
{
int max = 2006;
public int run(int i)
{
max -= i;
return max;
}
public static void main(String[] args)
{
Test t = new Test();
String s = args[0];
int ages = Integer.parseInt(s);
String s1 = args[1];
String s2 = args[2];
if(s1.equals("teacher")|| s1 == "teacher" )
{
java.util.Date d = new java.util.Date();
System.out.println(d.getYear());
Person p1 = new Teacher(s2,ages);
p1.Display();
System.out.println(t.run(ages));
}
else if(s1 == "student" || s1 == "teacher" )
{
Person p = new Student(s2,ages);
p.Display();
System.out.println(t.run(ages));
}
else
{
System.out.println("您输入的参数错误");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -