Java
Arrays.fill을 이용한 배열 채우기
yougeun
2022. 11. 28. 21:57
728x90
Arrays.fill을 이용한 배열 채우기
int[] arr= new int[5];
Arrays.fill(arr,1);//1차원 배열
Arrays.fill(arr,0,2,1); // 0~2 index까지 1로 채우기
int[][] arr2 = new int[5][5];
for (int[] a : arr2) { // 2차원 배열
Arrays.fill(a, 1);
}
알고리즘(등굣길)
https://school.programmers.co.kr/learn/courses/30/lessons/42898
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
https://github.com/yougeun6021/Algorithm/blob/master/src/Level3/WayToSchool.java
GitHub - yougeun6021/Algorithm
Contribute to yougeun6021/Algorithm development by creating an account on GitHub.
github.com
728x90