1. Which three are valid method signatures in an interface? private int getArea(); public float getVol(float x); public void main(String [] args); public static void main(String [] args); boolean setFlag(Boolean [] test);
Ask Your Doubts Here
Comments
By: guest on 02 Jun 2017 01.25 am
(2), (3), and (5). These are all valid interface method signatures. (1), is incorrect because an interface method must be public; if it is not explicitly declared public it will be made public implicitly. (4) is incorrect because interface methods cannot be static.