Ask Question
3 May, 05:56

What is the output from system. out. println ((int) (math. random () * 4)) ?

+1
Answers (1)
  1. 3 May, 08:42
    0
    In java, the math. random () function call will return a random number between 0 and 1. Therefore, the call 'math. random () * 4 ' will return a number between 0 and 4. The casting of this call to an integer ' (int) ' will return an integer with no fraction, so numbers 0, 1, 2, 3 or 4.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is the output from system. out. println ((int) (math. random () * 4)) ? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers