• Post Reply Bookmark Topic Watch Topic
  • New Topic

No Main type  RSS feed

 
Jeff Mclain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sorry but i need help this is my program i am supose to make


when i try to run it i get selection dose not contain a main type
please help
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff Mclain wrote:
when i try to run it i get selection dose not contain a main type


I doubt that's exactly what it says. If it is, then you should dump that IDE and do everything with a text editor and the comand line, for now at least.

What it's complaining about is that you do not have a public static void main(String[] args) method. You may think you do, but keep in mind that Java is case-sensitive. "Main" is not the same as "main".
 
Jeff Mclain
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Face palm i am an idiot i did not think of that thanks for the help
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Don’t worry. Everybody else has made that sort of mistake.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!