Notice
Recent Posts
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- SESSION
- 면접
- 제이쿼리
- 폼태그
- 필터체인
- 깃허브 간단요약
- 자바
- 셋업
- 알고리즘
- 깃허브
- 오라클
- springboot
- Spring
- jstl
- jquery
- jsp 내부객체
- 설치
- 버튼
- 설정
- EL태그
- Eclipse
- 자바스크립트
- 마이바티스
- html
- java
- 스프링
- Oracle
- jsp
- MySQL
- 이클립스
Archives
- Today
- Total
은은하게 코드 뿌시기
컬렉션프레임웍(Collections Framework) - ArrayList 본문
728x90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//ArrayList
ArrayList<Integer> a = new ArrayList<Integer>() ;
for (int i= 0;i<10;i++) {
a.add(i);
}
System.out.println("arraylist " + a.toString());
System.out.println("index " + a.get(0));
System.out.println("index " + a.get(1));
System.out.println("index " + a.get(2));
a.add(1,10);
System.out.println("arraylist " + a.toString());
System.out.println("indexOf " + a.indexOf(0));
System.out.println("indexOf " + a.indexOf(1));
System.out.println("indexOf " + a.indexOf(2));
System.out.println("contains?10? " + a.contains(10));
System.out.println("contains?11? " + a.contains(11));
a.remove(3);
System.out.println(a.toString());
|
cs |
728x90
'자바 > Collections Framework' 카테고리의 다른 글
컬렉션프레임웍(Collections Framework) - 큐(Queue) (0) | 2022.10.02 |
---|---|
컬렉션프레임웍(Collections Framework) - 스택(stack) (0) | 2022.10.02 |
컬렉션프레임웍(Collections Framework) - HashSet (0) | 2022.10.02 |
컬렉션프레임웍(Collections Framework) - Arrays 클래스 (0) | 2022.10.01 |
컬렉션 프레임웍(collections framework) - list,set,map (0) | 2022.08.09 |
Comments