Wednesday, 11 February 2015

Most frequently asked Core Java Interview Questions and Answers (Page 4)

Below are some important Core Java interview questions which are asked in most MNC company interviews for beginners or professionals.

16. What is the return type of the main method?
Main method doesn't return anything hence declared void.

17. Why is the main method declared static?
main method is called by the JVM even before the instantiation of the class hence it is declared as static.

18. What is the arguement of main method?
main method accepts an array of String object as arguement.

19. Can a main method be overloaded?
Yes. You can have any number of main methods with different method signature and implementation in the class.

20. Can a main method be declared final?
Yes. Any inheriting class will not be able to have it's own default main method.
More Questions & Answers :-
Page1  Page2  Page3  Page4  Page5  Page6  Page7  Page8

No comments:

Post a Comment