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...


What happens when the main() isn't declared as static?



What happens when the main() isn't declared as static?..

Answer / nashiinformaticssolutions

When the main method is not declared as static, then the program may be compiled correctly but ends up with a severe ambiguity and throws a run time error that reads

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How do I get a substring?

0 Answers  


How to sort the elements in HashMap

3 Answers   Ness Technologies,


What are the differences between string, stringbuffer and stringbuilder?

0 Answers  


What is run-time class and system class? what is their purpose?

1 Answers  


Can subclass overriding method declare an exception if parent class method doesn't throw an exception?

0 Answers  


Can singleton class be cloned?

0 Answers  


Is java based on c?

0 Answers  


Consider that class classA, abstract class classB, and final classC have been defined.Which one of the following is correct? 1. classA extends classC implements classB 2. class A extends classB, classC 3. classA extends classB 4. classB implements classC

2 Answers  


Explain the difference between getAppletInfo and getParameterInfo?

1 Answers  


5 What is Java exception handling?

1 Answers  


In Java why we write public static void main(String args[]) why not main()?

46 Answers   Aptech, GE Healthcare, Infosys, Microsoft, New Horizon, Practical Viva Questions, TCS, Wipro,


ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }

1 Answers  


Categories