BEE-Class
To demonstrate random numbers, develop a program that simulates 20 rolls of a six sided die and displays the value of each roll. Use nextInt to produce random values in the range 0–5, as follows: A six-sided die has the numbers 1–6 on its faces, not 0–5. So Shift the range of numbers produced by adding a shifting value—in this case 1—to previous result, as in The shifting value (1) specifies the first value in the desired range of random integers. The preceding statement assigns face a random integer in the range 1–6.
BCE-Class
Solution of the task given in lab is attached.