본문 바로가기

알고리즘/Java 문법 암기

배열 같은 값으로 채우기 Arrays.fill()

int ans[] = new int[n];
Arrays.fill(ans, 1);