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 

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

1 Expert Approved Answer
Step: 1 Unlock

Answer Option A is correct 10 Mathrandom 35 Not every loop expression needs a modifier By default ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

6364f054ed258_239849.pdf

180 KBs PDF File

Word file Icon

6364f054ed258_239849.docx

120 KBs Word File

Students Have Also Explored These Related Programming Questions!