Q. Determine output of the following program.
public class Test{
public static void main(String args[]){
System.out.println( Math.floor( Math.random( ) ) ) ;
}
}
public class Test{
public static void main(String args[]){
System.out.println( Math.floor( Math.random( ) ) ) ;
}
}
β
Correct Answer: (C)
0.0
Explanation: random() is a static method defined in Math class.