GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java

 Print  |  
Question:  Can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program?



February 02, 2006 05:40:03 #5
 Mithun   Member Since: Visitor    Total Comments: N/A 

RE: can we declare multiple main() methods in multiple...
 
In a single application user can create multiple main methods in multiple classes. But while running the application user needs to give one class name (which is the enty point of the application) which must have to have a main method which will create the main thread to run your application.
     

 

Back To Question