Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Varuna Seneviratna
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The above class compiles but can not be run


Regards Varuna
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you trying to run it ?
 
Varuna Seneviratna
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the need for the semicolon at the end of the classes Triangle and TriangleTest?


Regards Varuna
 
Campbell Ritchie
Sheriff
Pie
Posts: 50239
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The final semicolon is not necessary; most people would leave it out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic