Welcome Guest | Sign in | Register
Core - Java Programming Interview Questions and Answers | LucentBlackBoard | LucentBlackBoard.com
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.




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.