Put the following code in order to create a program that will declare and instantiate an array of 10 random values between 1 and 100 and then find the maximum value in the array.
import java.util.*;
public class main{
public static void main (String[] args) {
---
Random r = new Random();
int [] arr = new int[10];
---
for (int i = 0; i<10; i++) {
arr[i] = r.nextInt(100) + 1;
System.out.println("arr["+i+"] is " + arr[i]);
}
---
int max = arr[0];
---
for (int i = 1; i<10; i++) {
---
if (arr[i] > max)
---
max = arr[i];
---
}
---
System.out.println("Maximum value is " + max);
---
}
}