import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class clsWarehouse {
private static int iChoice;
private int iItemID;
private String strItemName;
private String strItemDescription;
private int iItemPrice;
private String strSize;
private String strSex;
public clsWarehouse (int id, String name, String description, int price, String size, String sex){
iItemID = id;
strItemName = name;
strItemDescription = description;
iItemPrice = price;
strSize = size;
strSex = sex;
}
public ArrayList <clsWarehouse> AllItems;
public clsWarehouse(){
AllItems = new ArrayList <clsWarehouse>();
AllItems.add(new clsWarehouse(3, "T-Shirt", "Male T-Shirt", 30, "15", "Male"));
System.out.println(AllItems);
}
public static void main(String[] args){
clsWarehouse c = new clsWarehouse();
}
}
}
こんにちは、ArrayList AllItems に格納されている値を取得したいのですが、取得できるのはメモリの場所 [clsWarehouse@a83b8a] だけです。誰かがこれで私を助けることができますか?
ありがとう!