can we override the main() method in java????
Answers were Sorted based on User's Feedback
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 |
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 |
What are library required to connect to excel sheet.
What is design pattern and there types?
Which Math method is used to calculate the absolute value of a number?
Can we convert stringbuffer to string?
what is difference between abstract factory and factory design patterns?
Can we have a abstract class withought any method? What is a purspose of this?
What do you understand by copy constructor in java?
What is the difference between the paint() and repaint() methods in java programming?
In Inheritance if we are implementing Multi level inheritance and all class having same name of variable and now i want to access each class variable and how it is possible?
Can list have duplicates in java?
what is polymorhism what is inheritance? what is Abstract n Interface? what if two interfaces have same method and a concrete class is implementing both the interfaces. Will there be a compilation error? What are mutable and immutable classes? How can u make a class mutable? when will u use dem ...explain with example? what is overriding and overloading? what is garbage collection? what is Thread? how do dey communicate? what are the different ways of implementing ? have u used any messaging technologies? what is synchronization? what are some additions in java 1.5? what are generics? whst is advanced for loop? what is finally block? can u have a try in finally? yes!! can u have a finally in finally? how do you write junits? when is a object eligible for garbage collection?explain? a = null and b has ref to a will b be eligible to be garbage collected? sql questions like diff joins? how do dey work? exception handling? what is marker interface? what is the need??
How does class forname work in java?