adplus-dvertising
frame-decoration

Question

What is the output of this program?
    class Output 
    {
        public static void main(String args[]) 
        {
            double x = 3.14;  
            int y = (int) Math.toDegrees(x);
            System.out.print(y);
        }
    }

a.

0

b.

179

c.

180

d.

360

Posted under Java Programming

Answer: (b).179

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. Which of these classes encapsulate runtime environment?

Q. Which of the following exceptions is thrown by every method of Runtime class?

Q. Which of these methods returns the total number of bytes of memory available to the program?

Q. Which of these Exceptions is thrown by loadClass() method of ClassLoader class?

Q. Which of these classes encapsulate runtime state of an object?

Q. Which of these methods returns the class of an object?

Q. Which of these methods return a class object given its name?

Q. Which of these class defines how the classes are loaded?

Q. Which of the interface contains all the methods used for handling thread related operations in Java?

Q. Which of these class is used to make a thread?

Q. Which of this interface is implemented by Thread class?

Q. Which of these methods of a Thread class is used to suspend a thread for a period of time?

Q. Which object Java application uses to create a new process?

Q. Which of the following is true about Java system properties?

Q. Java system properties can be set at runtime.

Q. Which system property stores installation directory of JRE?

Q. What does System.getProperty(“variable”) return?

Q. What is true about the setProperties method?

Q. How to use environment properties in the class?

Q. How to assign values to variable using property?