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
- math.abs
- 프로그래머스 알고리즘
- HashMap
- hackerrank javascript
- hackerrank javascript solution
- hackerrank solution
- Collection Framework
- ... in Javascript
- equals()
- C++
- 프로그래머스
- HackerRank Algorithm
- Javascript Algorithm
- easy algorithm
- javascript
- substring()
- code refactoring
- string class in java
- hackerrank
- repeat()
- Object type casting
- 프로그래머스 알고리즘문제
- algorithm
- rest parameter
- compareTo()
- math.max
- easy javascript algorithm
- spring boot application
- java
- 알고리즘
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함