Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Why is the singleton pattern considered to be an anti pattern?

0 Answers  


What is the exact difference in between Unicast and Multicast object ?

4 Answers   Accenture,


What is the importance of static variable?

0 Answers  


What is ellipsis in java?

0 Answers  


how can we use the servlet as standalone apllication?should we need to extend any class?

2 Answers   Logica CMG,


Can constructor return value?

0 Answers  


What is oop principle in java?

0 Answers  


What is difference between Iterator and for loop

9 Answers   HP,


What is the purpose of static methods and static variables?

0 Answers  


what is ABSTRACTION and what are using in real time project?

1 Answers   iGate,


What is the difference between multiple processes and multiple threads?

0 Answers  


what are synchronized methods and synchronized statements? : Java thread

0 Answers  


Categories