sonjh919.log
로그인
sonjh919.log
로그인
⚡ Java.util.Random
sonjh919
·
2023년 10월 18일
팔로우
0
Java api
0
Java API
목록 보기
13/16
🌈 java.util.Random
random.nextInt(구하려는 난수의 개수) + 구하려는 난수의 최소값
0~파라미터 사이의 random한 정수 반환
// 1~10
int
random1
=
random
.
nextInt
(
10
)
+
1
;
// 10 ~ 15
int
random2
=
random
.
nextInt
(
6
)
+
10
;
sonjh919
팔로우
이전 포스트
⚡ Java.util.Scanner
다음 포스트
⚡ Java.util.Arrays
0개의 댓글
댓글 작성