Question: Java Proframming and output should be similar to the one attached Write a Java program such that each time when your program runs, it automatically

Write a Java program such that each time when your program runs, it automatically generates random numbers for your array, and then these random numbers are sorted and printed out on the screen. To do so, you need to import something, which helps generate random numbers, from Java library. In addition, you have to allocate space for your array using dynamic storage allocation command, say new. Your program should behave similar to the one shown at https://www.dsm.fordham.edu/-astafaj, Enter 1 to generate new random array, enter '3' to exit: 46 406 306 257 344 387 1 41 Enter 1 to sort array or 2 to continue (3 to exit): 46 141 257 306 344 387 406 Enter 1 to generate new random array, enter '3' to exit: 581 676 857 461 319 27 243 Enter 1 to sort array or 2 to continue (3 to exit)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
