2020-11-17-TIL
String.split() vs StringTokenizer
https://sas-study.tistory.com/102
Java Date, Time
https://madplay.github.io/post/reasons-why-javas-date-and-calendar-was-bad
https://coding-factory.tistory.com/259
https://hyeonstorage.tistory.com/204
https://docs.oracle.com/en/java/javase/15/docs/api/java.sql/java/sql/Date.html
https://stackoverflow.com/questions/12067697/convert-current-date-to-integer
How to get hour, miniute in Java
https://stackoverflow.com/questions/2654025/how-to-get-year-month-day-hours-minutes-seconds-and-milliseconds-of-the-cur
https://stackoverflow.com/questions/8150155/java-gethours-getminutes-and-getseconds/8150681
Calendar
https://stackoverflow.com/questions/26962388/printing-a-calendar
How to get current time usinig Calendar in Java
https://stackoverflow.com/questions/6055112/why-can-i-have-only-one-instance-of-calendar-object
1
2
3
Calendar cal = Calendar.getInstance();
Calendar cal2 = Calendar.getInstance();
System.out.println(cal == cal2);
it’s not singleton
https://stackoverflow.com/questions/30842413/does-getinstance-denote-a-singleton-according-the-singleton-pattern/30842570
https://stackabuse.com/how-to-get-current-date-and-time-in-java/
Date refresh without create new instance
https://stackoverflow.com/questions/21859981/java-date-that-refreshes/21860245
How to clear screen in Java
https://lottoking.tistory.com/2387
https://www.quora.com/How-do-I-clear-console-screen-CMD-screen-in-Java-Is-there-any-function-in-Java-like-clrscr-and-system-cls-in-C
How to initialize/fill 2d array with 0 in Java
https://stackoverflow.com/questions/7118178/arrays-fill-with-multidimensional-array-in-java
Java set color in console
https://stackoverflow.com/questions/5762491/how-to-print-color-in-console-using-system-out-println
Map
K,V 구조의 자료구조
Map<String, Long> map = new HashMap<>();
제너릭 타입에는 객체로 전달을 해야하므로 프리미티브 타입을 객체로 사용하려면 Wrapper클래스를 사용하면 된다.
HashMap vs HashTable
https://odol87.tistory.com/3
Wrapper Class
Long x = 100L;
변수 = 리터럴 상수
자바 최신버전에서는 자동으로 오토박싱/언박식으로 자동 캐스팅을 해준다.
https://m.blog.naver.com/PostView.nhn?blogId=clown7942&logNo=110120983491&proxyReferer=https:%2F%2Fwww.google.com%2F
Java Optional
http://homoefficio.github.io/2019/10/03/Java-Optional-%EB%B0%94%EB%A5%B4%EA%B2%8C-%EC%93%B0%EA%B8%B0/
null 체크는 if문으로 체크하는 것보다 Optional을 이용하는것이 더 최신 feature
Kotlin은 Optional이 기본형이다 -> NullPointException이 예방된다.
객체를 멤버값이아닌 주소값으로 정렬을 한다던가 가끔 사용하는 경우가 있다
자바에서는 var보다 명확하게 타입을 적어주는 것이 좋다?
Process and Thread
프로그램은 항상 파일이 있고, 사용자가 어떤 작업으로 하고 다시 파일로 저장
CPU - Memory - SSD/HDD
https://magi82.github.io/process-thread/
하이퍼 스레딩
https://www.intel.co.kr/content/www/kr/ko/gaming/resources/hyper-threading.html
가상화
https://kim-dragon.tistory.com/5
Session, Connection, Transaction
https://db.apache.org/derby/docs/10.12/devguide/cdevconcepts19173.html
https://zhangyuhui.blog/2018/01/29/jpa-transaction-hibernate-session-jdbc-connection-and-db-transaction/