코테 공부하다가 변환 할 일이 많아서 정리해놓을려고 합니다. 1. String[] 배열을 List 로 변환# Stream 사용String[] str = new String[]{"A","B","C"};List list = new ArrayList();list = Arrays.stream(str).collect(Collectors.toList());# Arrays.asList 사용String[] str = new String[]{"A","B","C"};List list = new ArrayList(Arrays.asList(str));# for문String[] array = new String[3];array[0] = "Test1";array[1] = "Test2";array[2] = "Test3";Array..
주로 사용하는거 정리해볼려고 합니다. public class HashMap { public static void main(String[] args) { Map map = new java.util.HashMap(); map.put("a", "에이"); map.put("b", "비"); map.put("c", "씨"); System.out.println("----------------------------"); System.out.println(map.get("a")); System.out.println(map); System.out.println("----------------------------"); // 반복문 사용해보기 System.out.println(map.keySet()); ..
오류메세지 incompatible types: possible lossy conversion from double to int 원인 int는 정수를 저장할 때 사용되기 때문에 소수점이 있는 값(실수형)을 int로 변환하면 소수점 아래의 수를 잃게 된다. 따라서 double을 int로 저장하는 것은 lossy 할 수 있기 때문에 자바는 허용하지 않는다. 해결방법 강제 형변환을 진행한다. double d = 1.9; int n = (int) d;
- Total
- Today
- Yesterday
- bool
- GIT
- logstash
- 재색인
- index 처리를 잘하자
- literal sql
- React18
- Query
- Elasticsearch
- config
- 인덱스
- pm2-logrotate
- EL
- NextJS 14
- Mappings
- kibana
- 키바나
- 절대 경로 설정하기
- InteiilJ
- list
- Linux
- react
- Mapping
- ElasticSearach 백업
- mysql은 nl이 기본 세팅
- 명령어
- Java
- string
- ArrayList
- 문자
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |