Have A and B implement a common interface that has a method getID:then you could have:https://stackoverflow.com/questions/13710954/using-getter-w
(방법2) ArrayList에서 객체의 index 가져오기indexOf 함수를 이용특정 객체를 참조하는 변수가 있을 때 해당 변수를 사용하면 indexOf(객체변수)를 이용해서 해당 객체의 index를 자료구조 안에서 찾을 수 있습니다.indexOf()함수는 자료구조에
서버소켓 만들고 연결 읽기 && 쓰기
Try-with-resources 로 변경하고 싶은데 방법이 안 떠오른다...
https://bcuts.tistory.com/24https://howtodoinjava.com/java/multi-threading/atomicinteger-example/https://lovon.tistory.com/168https
객체들간의 의존관계는 적을수록 좋다. 물론 케바케이고 실제로 디자인 패턴 중에 의존관계를 한 곳에 몰아넣는 패턴도 있지만, 일반적으로 객체들간 의존관계가 많으면 많을수록 어플리케이션의 복잡도는 늘어나기 마련이다. 가장 좋은 설계는 아예 의존관계 없이 독립적으로 실행가
간단히 Request 요청을 받는 DTO class 가 있다고 치자.이 data class에는 Country라는 enum class가 필드로 선언되어있다. 나는 요청을 enum으로 받기 위해, @JsonValue를 활용했다.정상적으로 문자열 요청이 enum으로 잘 매핑
Kotlin Coroutines vs Java Virtual Threads — A good story, but just that…https://itnext.io/kotlin-coroutines-vs-java-virtual-threads-a-good-story-