231221 JAVA List03(컬렉션 - list)
2023. 12. 21. 20:20ㆍ2023.11.21-2024.05.31
package com.sukgi.coll;
import java.util.ArrayList;
import java.util.List;
public class List03 {
public static void main(String[] args) {
List<Integer> list = new ArrayList();
list.add(1);
//list.add("홍길동");
for (int i = 0; i < list.size(); i++) {
int number = (int) list.get(i);
System.out.println(number);
}
int number = (int) list.get(0);
}
}
1
'2023.11.21-2024.05.31' 카테고리의 다른 글
231221 JAVA Set02(컬렉션 - set) (0) | 2023.12.21 |
---|---|
231221 JAVA Set01(컬렉션 - set) (0) | 2023.12.21 |
231221 JAVA List02(컬렉션 - list) (0) | 2023.12.21 |
231221 JAVA List01(컬렉션 - list) (0) | 2023.12.21 |
231221 JAVA Coll01(컬렉션 - list) (0) | 2023.12.21 |