Array & Object
HashMap
注意指定內容型態 <內容型態>
import java.util.HashMap;
import java.util.ArrayList;
public class Test
{
public static void main(String[] args)
{
ArrayList<HashMap> ResList = new ArrayList<HashMap>();
HashMap<String, String> map = new HashMap<String, String>();
map.put("A", "111");
map.put("B", "222");
map.put("C", "333");
map.put("D", "444");
map.put("E", "555");
map.put("F", "666");
map.put("G", "777");
map.put("H", "888");
map.put("I", "999");
ResList.add(map);
ResList.add(map);
ResList.add(map);
ResList.add(map);
if((200-ResList.size()) > 0){
System.out.print("size:");
System.out.print(200-ResList.size());
}
}
}