item 59) 라이브러리를 익히고 사용하라
직접 구현한 메서드
static Random rnd = new Random();
static int random(int n) {
return Math.abs(rnd.nextInt()) % n;
}표준 라이브러리 사용의 장점
Last updated
static Random rnd = new Random();
static int random(int n) {
return Math.abs(rnd.nextInt()) % n;
}Last updated