πŸ“Š JAVA
Q. Determine output of the following program.
public class Test{
public static void main(String args[]){
System.out.println( Math.floor( Math.random( ) ) ) ;
}
}
  • (A) 1.0
  • (B) 10.0
  • (C) 0.0
  • (D) 0.5
πŸ’¬ Discuss
βœ… Correct Answer: (C) 0.0

Explanation: random() is a static method defined in Math class.

Explanation by: Vikash Gupta
random() is a static method defined in Math class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
187
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Vikash Gupta
Publisher
πŸ“ˆ
94%
Success Rate