20. Which of the following statements are true about defining method?
[a] Transient is a valid modifier.
[b] Methods with no access modifier can be called from main() method.
[c] Abstract methods have no implementation in the class where they are defined.
[d] static is a valid modifier for methods
Answer
[b] Methods with no access modifier can be called from main() method.
[c] Abstract methods have no implementation in the class where they defined.
[d] static is a valid modifier for methods
Note: The answer [b], if the method is declared as static then it is possible, else need an instance of the class. |