📄 group5.java
字号:
public class Group5
{
public interface Student_info //内部接口
{
public void output();
}
public class Student implements Student_info //内部类实现内部接口
{
int count;
String name;
public Student(String n1)
{
name = n1;
count++;
}
public void output() //实现接口方法
{
System.out.println(this.name +" count="+this.count);
}
}
public Group5(String name1[])
{
Student s1;
int i=0;
while (i<name1.length)
{
s1 = new Student(name1[i]);
s1.output();
i++;
}
}
public static void main (String args[])
{
Group5 g5;
if (args.length>0)
g5 = new Group5(args);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -