Question: What is the expression to be added in the loop such that the array myArray is filled with integers between 10 and 45 both
What is the expression to be added in the loop such that the array myArray is filled with integers between 10 and 45 both inclusive? * public static void main (String[] args) { int [] myArray = new int [10]; for (int i = 0; i < myArray.length; i++) { %3D myArray [i] ???? 10 + ( Math.random () * 35) 10 + (int) (Math.random () * 36 ) O Math.random () * 45 All the above None of the above
Step by Step Solution
There are 3 Steps involved in it
Answer Option A is correct 10 Mathrandom 35 Not every loop expression needs a modifier By default ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
6364f054ed258_239849.pdf
180 KBs PDF File
6364f054ed258_239849.docx
120 KBs Word File
