在java里面定义对象数组我采用的方式一般是这样的
如果是静态的数组
[code]myclass 类的声明
public myclass myArray[];
......
{
myArray= new myclass[Your array num];
myArray[0] = new myclass();
......
}
Object[] obj = new Object[2];
[/code]
如果是静态的数组
[code]myclass 类的声明
public myclass myArray[];
......
{
myArray= new myclass[Your array num];
myArray[0] = new myclass();
......
}
Object[] obj = new Object[2];
[/code]