?? stu2.java
字號(hào):
public class Stu2 implements Student_info, Student_scoure
{ //實(shí)現(xiàn)學(xué)生情況接口、學(xué)生成績接口
String name;
int birth_year;
float math,english,computer;
public Stu2(String n1,int y,float a,float b,float c)
{
name = n1;
birth_year = y;
math = a;
english = b;
computer = c;
}
public int age()
{
return year - birth_year;
}
public float total()
{
return math + english + computer;
}
public void output() //實(shí)現(xiàn)接口的方法
{
System.out.print(this.name +" "+ this.age()+"歲 ");
System.out.println(math +" "+ english +" "+ computer +" "+ total());
}
public static void main (String args[])
{
Stu2 s2 = new Stu2("李明",1980,90,80,70);
s2.output();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -