Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[solved]when i run file,promt message "Class "lab4.que1" does not have a main method."why?

 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


above is my complete program file,what wrong to the code?
 
Henry Wong
author
Marshal
Pie
Posts: 20902
76
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
main method needs to be static for the class to be executed from the command line.

Henry
 
L Willie
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:main method needs to be static for the class to be executed from the command line.

Henry

thank
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic