Complete the following code. Make sure to complete the code…
Complete the following code. Make sure to complete the code in such a way that doesn’t invalidate the comments and that no implicit conversions are taking place on assignments of primitive data types 1. public class Test { public static void main(String[] args) { int randInt; double mathDouble; // create a Random object Random rand = 2. // get a random integer between 17 (inclusive) and 77 (inclusive) randInt = 3. // get a random double between 45 (inclusive) and 90 (exclusive) mathDouble = 4. // compute mathDouble divided by randInt double num = mathDouble / randInt; // print average to 5 decimal places 5. }} 1: [import] 2. [init]3: [int]4: [double]5: [print]
Read Details