ArrayExRef6 ์ฝ๋ ์ง๋ฌธ์์ต๋๋ค.
์ฐ์ฐํ ๋ณด๊ฒ ๋์ด ๋๊ธ ๋จ๊น๋๋ค!์ถํ ์คํธ๋ฆผ์ ๊ณผ์ ์ ๋ฐฐ์ฐ๊ฒ ๋๋ฉดint numbers[] ๊ฐ์ Arrays.stream์ผ๋ก ์ด์ฉํด์ ์คํธ๋ฆผ์ผ๋ก ํ๋ค์ ํด๋น ๋ฐฐ์ด์ min, max๊ฐ์ ๊ฐ์ ธ์ฌ ์ ์์ต๋๋ค..getAsInt()๋ int ๋ณ์์ ๋ด๊ธฐ ์ํด ์ฌ์ฉํ์ต๋๋ค. int minValue = Arrays.stream(numbers).min().getAsInt(); int maxValue = Arrays.stream(numbers).max().getAsInt(); System.out.printf("๊ฐ์ฅ ์์ ์ ์: %d \n", minValue); System.out.printf("๊ฐ์ฅ ํฐ ์ ์: %d", maxValue);