Given:
public class Main{ public int base; public int height; private static double c; public static double getAngle (); public static void Main (String [] args) { System.out.println (getAngle ()); }//from w w w . j av a 2 s . c o m }
Identify the correct statements:
Select 1 option
setAngle()
method.getAngle()
has no body.Correct Option is : C
For A.
There is no requirement that a class has to have a setter as well as a getter.
For B.
Any field can be made private.
For D.
Since it is a static field, it will get a default value of 0.0.
For E.
A class can have a method named Main.