定义一个类Appleclass Apple{
String color;
float weight;
}先在我要想声明一个普通数组一样,比如int[] a=new int[10];
一样声明一个长度为10 的Apple类的数组,如何搞之?
String color;
float weight;
}先在我要想声明一个普通数组一样,比如int[] a=new int[10];
一样声明一个长度为10 的Apple类的数组,如何搞之?
Apple [] ap = new Apple[10];