2562 자바1 백준 단계별 문제 <1차원 배열> 백준 문제 2562번 자바 문제 해결은 2가지 방법으로 해결했다. 1번째 방법은 Scanner와 배열을 이용한 방법 2번째 방법은 BufferReader를 통해 스트림 처리 1번째 방법 import java.util.*; public class Array_1 { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int max=0; int max_index=0; int[] arr = {sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt(), sc.nextInt() }; sc.c.. 2022. 2. 16. 이전 1 다음 반응형