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 does 3 dots mean in java?
Why is it called buffering?
what is request dispatcher and how does it work?
how to connect one jsp page to another jsp page????
Can you declare a private method as static?
What is null object in java?
In which way does a Primitive data type is passed ?
Can memory leak in java?
What is Enum in Java?
Write a function to print Fibonacci series and Tribonacci series?
Difference between character constant and string constant in java ?
What is collection api?