• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Selection Does not contain a main type?

 
Cameron Jones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

what'd I do wrong?
I know I'm a newb, and this is simple...
 
Tina Smith
Ranch Hand
Posts: 208
9
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method signature you are looking for is



You missed the static keyword, which allows the main method to be run without instantiating the Car class.

P.S. Please use the code tags when posting code.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50278
80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I have changed the quote tags to code, and you can see how much better it looks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic