MCQ Answer

Which among the following expression will return a random integer between 5 and 10 both inclusive?

Which among the following expression will return a random integer between 5 and 10 both inclusive?

Topic : JAVA Library Classes

A. 5+(int)(Math.random()*6)

B. 5+(int)(Math.random()*10)

C. 5+Math.random()*6

D. 5+Math.random()*10




Correct Answer is :

A. 5+(int)(Math.random()*6)



Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad