This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Whyis the error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Whyis the error "Exception in thread "main" java.lang.NoSuchMethodError: main"?" Watch "Whyis the error "Exception in thread "main" java.lang.NoSuchMethodError: main"?" New topic
Author

Whyis the error "Exception in thread "main" java.lang.NoSuchMethodError: main"?

Varuna Seneviratna
Ranch Hand

Joined: Jan 15, 2007
Posts: 167


The above class compiles but can not be run


Regards Varuna


Varuna Seneviratna
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3419
    
  12
How are you trying to run it ?


Joanne
Varuna Seneviratna
Ranch Hand

Joined: Jan 15, 2007
Posts: 167
Originally posted by Joanne Neal:
How are you trying to run it ?


Yes Thanks I found it, I was running Triangle not TriangleTest

Varuna
Varuna Seneviratna
Ranch Hand

Joined: Jan 15, 2007
Posts: 167
What is the need for the semicolon at the end of the classes Triangle and TriangleTest?


Regards Varuna
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37936
    
  22
The final semicolon is not necessary; most people would leave it out.
 
Consider Paul's rocket mass heater.
 
subject: Whyis the error "Exception in thread "main" java.lang.NoSuchMethodError: main"?
 
Similar Threads
Triangle Problem
I need help on an equals method
Using super keyword
Question regarding Inheritance
(new to java)variables might not have been initialized