# Random 클래스
## 문제
`Random` 클래스를 활용하여 출력 예와 같은 난수를 생성하시오.
## 자바 API 문서
+ https://docs.oracle.com/javase/8/docs/api/
## 뼈대코드
```
import java.util.Random; // Random 클래스 불러오기.
public class Main {
public static void main(String[] args) {
Random rand = new Random();
// 난수 생성
int a = 0; /* 1. 임의의 정수를 생성하시오. */
int b = 0; /* 2. 0~30 사이의 정수를 생성하시오 */
double c = 0; /* 3. 임의의 실수를 생성하시오. */
boolean d = false; /* 4. 임의의 참/거짓을 생성하시오. */
// 출력
System.out.printf("nextInt(): %d\n", a);
System.out.printf("nextInt(30): %d\n", b);
System.out.printf("nextDouble(): %f\n", c);
System.out.printf("nextBoolean(): %s\n", d);
}
}
```
## 출력 예
```
nextInt(): 1788063462
nextInt(30): 3
nextDouble(): 0.392243
nextBoolean(): true
```