Convert Array to ArrayList, ArrayList to Set
asList() is used to convert Array to List. This example takes an Integer type array as a parameter and it needs to remove duplicate numbers as a result. But, when you use asList(), the type of array should be Object type wrappers. Because Generics only works for a reference type. List 는 Generic 이기에 오직 reference type만을 전달 받는다. 그래서 asList()에 primitive 타입이 올 수 없게 된다. Example Code import java.util.*..
JAVA
2019. 7. 1. 14:10
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- HackerRank Algorithm
- hackerrank solution
- equals()
- hackerrank javascript
- Javascript Algorithm
- HashMap
- Collection Framework
- ... in Javascript
- hackerrank
- easy javascript algorithm
- hackerrank javascript solution
- repeat()
- easy algorithm
- java
- math.abs
- 알고리즘
- Object type casting
- algorithm
- javascript
- 프로그래머스 알고리즘
- 프로그래머스 알고리즘문제
- string class in java
- rest parameter
- compareTo()
- substring()
- code refactoring
- 프로그래머스
- spring boot application
- math.max
- C++
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함