병렬스트림1 Stream & Optional & Parallel Stream 아래 코드는 특정 숫자를 비교하여 출력및 예외를 던지는 코드입니다. 1234를 비교 하기때문에 RuntimeException이 발생하게 됩니다. public class ForAndIfFilterExampleMain { public static void main(String[] args) { List integerList = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); Integer findNumber = null; for (int i = 0; i < integerList.size(); i++) { if(integerList.get(i).equals(1234)) { findNumber = integerList.get(i); break; } } if(findNumber == nul.. 2023. 12. 12. 이전 1 다음