Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


can we override the main() method in java????

Answers were Sorted based on User's Feedback



can we override the main() method in java????..

Answer / zameer

Yes we can override the main() method in java but that main() method are not declare static keyword.
If main() method is static then we can not override

Is This Answer Correct ?    4 Yes 2 No

can we override the main() method in java????..

Answer / kapil

yes we can override the main method but different argument
bcz jvm always look for String[] args argument

Is This Answer Correct ?    2 Yes 3 No

can we override the main() method in java????..

Answer / rajkumar

Hi ,You have rights to overload main(),but jvm can invoke
only main with String[] s. not other arguments main.If u
come for override both sub class and super class can hold
its own main. any way we can't invoke main with help of
either object ref or super. but at compile time we can't get
any error suppose both super and sub has main

Is This Answer Correct ?    4 Yes 10 No

Post New Answer



More Core Java Interview Questions

What do you mean by default constructor in java?

0 Answers  


Is 'sizeof' a keyword?

7 Answers  


What are the methods used to implement for the key object in the hash map?

0 Answers  


How to check if a list is sorted in java?

0 Answers  


Which of the classes will have more memory allocated?

0 Answers  






Define jre i.e. Java runtime environment?

0 Answers  


How can we create an immutable class in java?

0 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

0 Answers  


What is the difference between class & object?

0 Answers  


If there is no implementation of MARKER INTERFACE in java. Then how compiler come to know about specification.

2 Answers  


How do you create a reference in java?

0 Answers  


Can you use this() and super() both in a constructor?

0 Answers  






Categories