Lambda can be replaced with method reference

Java

람다(Lambda)와 익명 클래스 :: Lambda can be replaced with method reference

IntelliJ에서 자주 보이는 메세지...? Lambda can be replaced with method reference Anonymous new Consumer() can be replaced with lambda Anonymous new Consumer() can be replaced with method reference IntelliJ를 이용해서 개발하다보면 위와같은 메세지와 함께 여러 Refacotring 들이 생깁니다. 그리고 어떤 옵션을 선택하는 순간 마법처럼 IntelliJ가 코드를 간결하게 만들어줍니다. IntelliJ의 유혹(?) 이런 IntelliJ의 유혹(?)에 견디지 못해 막 실행하다보면 왜 이렇게 코드가 변했는지 알지 못하고 해당 로직에서 문제가 발생했을 때 트러블 슈팅에서..

코비코비
'Lambda can be replaced with method reference' 태그의 글 목록