-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPractical_11.java
More file actions
116 lines (113 loc) · 810 Bytes
/
Practical_11.java
File metadata and controls
116 lines (113 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*Question := Write a program that creates a Random object and displays the first 100 random integers between
1 and 49 using NextInt(49) methods.*/
import java.util.Random;
public class Practical_11 {
public static void main(String[] args) {
Random ra = new Random();
for(int i=0; i<100; i++) {
System.out.println(ra.nextInt(50));
}
}
}
/* output :=
1
1
4
44
16
39
29
33
33
32
31
36
26
14
21
16
8
18
16
15
5
30
0
3
15
46
6
24
17
19
26
2
5
23
6
26
26
17
22
16
3
11
2
6
33
28
30
2
17
33
44
17
8
9
32
25
42
48
10
42
43
26
23
9
33
1
27
25
49
16
46
14
32
39
36
44
9
29
21
31
9
7
29
26
32
14
12
49
8
44
0
18
42
3
24
15
13
37
43
12
*/