Java Tips

8335 ワード

[Jackson]タイプリファレンスを使用して鋳造情報を渡す]


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

base 64コーデックの使い方


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

正規表現を使用した分割区切り文字を含む


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///Javaでスペースで区切る

ArrayList for文使用時のインデックスインポート

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