자바 Tips

공부는 혼자하는 거·2022년 4월 17일
0

JAVA & Kotlin Tip

목록 보기
6/11

[[Jackson] TypeReference를 이용한 캐스팅 정보전달]

https://bcuts.tistory.com/24

Thread Safe AtomicInteger

https://howtodoinjava.com/java/multi-threading/atomicinteger-example/

Java List null, size > 0 동시 검사

import org.springframework.util.CollectionUtils;
import org.apache.commons.collections.CollectionUtils; 

public static void main(String[] args) { 
		List<String> nullList = null; boolean nullListEmpty = CollectionUtils.isEmpty(nullList);
		 System.out.println(nullListEmpty); // true 
		List<String> sizeZeroList = new ArrayList<>(); 
		boolean sizeZeroEmpty = CollectionUtils.isEmpty(sizeZeroList); 
		System.out.println(sizeZeroEmpty); // true
 }

https://lovon.tistory.com/168

JSOUP

https://partnerjun.tistory.com/42
https://offbyone.tistory.com/116

base64 encodeing,decoding 사용법

https://pandorica.tistory.com/4?category=86294

https://pilot376.tistory.com/3

https://okky.kr/article/342165

https://stackoverflow.com/questions/17506428/convert-base64-string-to-image-in-java

Arraylist를 문자열로 변환하는 방법

https://www.delftstack.com/ko/howto/java/how-to-convert-an-arraylist-to-a-string-in-java/

XML < = > JAVA jackson

https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=writer0713&logNo=221122247629

JAVA 특수문자 사용방법,입력방법

1. []으로 싸주면 문자자체로 인식하는 것들.   ⇒ [] +  ⇒ [+]    [  ⇒ [] |  ⇒ [|] 

2. \를 붙여줘야 하는 것들. ( ⇒ \( ) ⇒ \) { ⇒ \{ } ⇒ \} ^ ⇒ \^ [ ⇒ \[ ] ⇒ \] 

3. 자바의 특수문자는 \을 쓴다.  " ⇒ \" 

4. 나머지 부호들은 괜찮은 듯 하다. 확인된 것. ! # % & @ ` : ; - . < > , ~ ' ex )

https://denodo1.tistory.com/216

https://stackoverflow.com/questions/4283351/how-to-replace-special-characters-in-a-string/4283366

정규표현식을 활용한 split 구분자 포함

https://stackoverflow.com/questions/4416425/how-to-split-string-with-some-separator-but-without-removing-that-separator-in-j

mysql <-> java data type

https://daemonjin.tistory.com/entry/mysql-java-data-type

How to split String with some separator but without removing that separator in Java?

https://stackoverflow.com/questions/4416425/how-to-split-string-with-some-separator-but-without-removing-that-separator-in-j

https://codechacha.com/ko/java-regex/

https://stackoverflow.com/questions/33817291/regex-how-to-split-string-without-removing-that-seperator-and-adding-it-in-seper

Hex(16진수)와 Byte 형변환, 또는 Float으로 형변환

https://ddangeun.tistory.com/43

https://www.javamex.com/tutorials/conversion/decimal_hexadecimal.shtml

https://dojang.io/mod/page/view.php?id=740

https://www.delftstack.com/ko/howto/java/java-split-string-by-space/ //자바에서는 공백 기준으로 split

ArrayList에서 for문(for-each)을 사용할 때 Index 가져오기

int index = 0;
for (Test element : arrayList){
    if(element.intVal == 3){
        arrayIndexList.add(index);
    }
    // index 증가
    index++;
}
for (Test element : arrayList){
    if(element.intVal == 3){
        // 아래처럼 indexOf(객체) 함수를 이용
        arrayIndexList.add(arrayList.indexOf(element));
    }
}

https://twpower.github.io/54-get-index-in-java-iterator

컬렉션 객체 차집합, 교집합, 합집합, 부분집합

https://ddolcat.tistory.com/794

profile
시간대비효율

0개의 댓글