android java 物件陣列如何傳constructor參數
Category [] categories = new Category[4];
categories[0] = new Category(10);
categories[1] = new Category(20);
categories[2] = new Category(30);
categories[3] = new Category(40);
或
private Category[] categories = new Category[4];
private Category[] categories = {new Category(max), new Category(max), new Category(max), new Category(max)};