aspose file tools*
The moose likes Beginning Java and the fly likes Selection Does not contain a main type? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Selection Does not contain a main type?" Watch "Selection Does not contain a main type?" New topic
Author

Selection Does not contain a main type?

Cameron Jones
Greenhorn

Joined: Oct 17, 2011
Posts: 1

what'd I do wrong?
I know I'm a newb, and this is simple...
Tina Smith
Ranch Hand

Joined: Jul 21, 2011
Posts: 171
    
    5

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.


Everything is theoretically impossible, until it is done. ~Robert A. Heinlein
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38896
    
  23
Welcome to the Ranch

I have changed the quote tags to code, and you can see how much better it looks.
 
 
subject: Selection Does not contain a main type?