A

Admin • 828.03K Points
Coach

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
  • Correct Answer - Option(C)
  • Views: 16
  • Filed under category Java
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.