📄 kids5.java
字号:
//c4:Kids5.java
//author:ZhangHongbin
//This program is protected by copyright laws.
//use extends.
class Mankind
{
float employed (int salaryValue)
{
return salaryValue*0.8f;
}
}
public class Kids5 extends Mankind
{
int mySalary1;
float mySalary2;
public static void main(String[] args)
{
Kids5 someKid=new Kids5();//创建对象
someKid.mySalary1=1000;//给对象中的数据赋值
someKid.mySalary2=someKid.employed(someKid.mySalary1);
System.out.println("boss promise i can get "+someKid.mySalary1);
System.out.println("but he only give me "+someKid.mySalary2);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -