class Persion
{
String m_name;
public Persion(String name)
{
m_name=name;
}
public void sayHelllo()
{
System.out.println("Hello I'm "+m_name);
}
}
class PersionArray
{
public static void main(String[] args)
{
Persion[] arr=new Persion[5];
arr[0]=new Persion("A");
arr[1]=new Persion("B");
arr[2]=new Persion("C");
arr[3]=new Persion("D");
arr[4]=new Persion("E");
for(int i=0;i<5;i++)
arr[i].sayHelllo();
System.out.println("Hello World!");
}
}
/*
Hello I'm A
Hello I'm B
Hello I'm C
Hello I'm D
Hello I'm E
Hello World!
请按任意键继续. . .
*/