What is the possible output from System.out.println((int)(Math.random() * 4))?
a. 0
b. 1
c. 2
d. 3
e. 4
a. 0
b. 1
c. 2
d. 3
Math.random() returns a real value between 0.0 and 1.0, excluding 1.0. Math.random() * 4 yields a real value between 0.0 and 4.0, excluding 4.0. After casting, the resulting integer may be 0, 1, 2, or 3.
You might also like to view...
Audio file types including .mp3 and .mp4 are supported in PowerPoint
Indicate whether the statement is true or false
What type of attack is being attempted when an attacker uses a password-cracking program to guess passwords by attempting every possible combination of letters?
A. brute force B. replay C. ciphertext-only D. dictionary
Identify the mode of message transmission usedin smishing.
a. Multimedia Messaging Service b. Short Message Service c. Email d. Voice mail
You assign bullets when creating an unordered list.
Answer the following statement true (T) or false (F)