public static class Item{
private int id;
private String[] models;
Item(int id, String[] models){
this.id = id;
this.models = models;
}
public int getId() {
return this.id;
}
public int getModelsArraySize() {
return models.length;
}
public String[] getModelsArray() {
return models;
}
}
Item arr[] = new Item[3];
arr[0] = new Item(1, new String[]{"Model1", "Model2", "Model3"});
arr[1] = new Item(2, new String[]{"Model4", "Model4", "Model6"});
arr[2] = new Item(3, new String[]{"Model7", "Model8"});