9
Java 8의 다중 널 검사
여러 null 검사에 대해 약간 추악한 아래 코드가 있습니다. String s = null; if (str1 != null) { s = str1; } else if (str2 != null) { s = str2; } else if (str3 != null) { s = str3; } else { s = str4; } 그래서 Optional.ofNullable아래와 …