Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • 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
Marshal
Posts: 52634
119
  • 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.
 
No, tomorrow we rule the world! With this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!