can we override the main() method in java????
Answer Posted / 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 View All Answers
Is map sorted in java?
What is core java called?
why not override thread to make a runnable? : Java thread
Explain about doubly linked list
Can an interface have a constructor?
What is a priority queue java?
Why char array is favored over string for the storage of passwords?
Explain enumeration in java?
What is hash table in java?
What is default exception handling in java?
What are generic methods?
What's a method in programming?
Write a function for palindrome and factorial and explain?
What is a variable and constant?
How do you get the length of a string in java?