
C#에는 List의 형태의 동적 배열이 존재한다.
자바는 같은 기능을 하는 ArrayList를 제공한다.
ArrayList<Integer> sNums = new ArrayList<Integer>();
for (int sLoop =0 ; sLoop < 10 ; sLoop ++)
sNums.add(sLoop);
int sidx = sNums.indexOf(6);
System.out.println("index has been located in No." + sidx);
HashSet<String> tempHashSet = new HashSet<String>();
tempHashSet.add("Robin");
for (int sLoop =0 ; sLoop < 10 ; sLoop ++)
tempHashSet.add(sLoop);
HashMap<String, Integer> tempMap = new HashMap<>();
tempMap.put("Robin",31);
tempMap.put("Soo",34);
tempMap.put("Sparta",32);
tempMap.put("Jonny",37);
tempMap.put("Roow",35);
System.out.println("tempMap`s Datas = "+ tempMap);
System.out.println("tempMap`s Keys = "+ tempMap.keySet());
System.out.println("tempMap`s Values = "+ tempMap.values());