Many applications use random numbers (to simulate uncertainty,to avoid patterns
ID: 3613027 • Letter: M
Question
Many applications use random numbers (to simulate uncertainty,to avoid patterns that can cause inefficiency, to make successiveexecutions of the same program behave differently). Javaprovides at least 2 ways to do this. Let's use the class Randomfrom the java.util package.
1) write a few statements that will print the sum of 5randomly chosen integers, equally likely to be 0,1,...,9.
2) write a few statements that will print 10 rolls of apair of dice. (The value of each roll will be between 2 and 12 but7 will be the most likely roll.)