Hi,
You cannot call a java class if it doesn't have a main method. In the code you posted there is this line:
// public Static Void main (String args[]){} (Static needs to change to static)
When you run a java class: E:\sher\SkyDrive\Exercise Files\L04>java Student
Its main method is called.
Simply uncomment the method main, or create a new class with a main method inside. In the body of the main you will put the code that you want to execute.
javaAddict
Nearly a Senior Poster
3,338 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 450
Skill Endorsements: 7
Don't forget to move your main method to inside the class definition (ie after line 7)
JamesCherrill
... trying to help
8,670 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,479
Skill Endorsements: 33
You can not define a method inside of another method. Make sure there is an ending '}' for a method's definition BEFORE starting to define a new method.
Line 3 starts a method definition. Line 10 starts a new method definition. There needs to be an ending '}' for the method started on line 3 before the new definition on line 10.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Aries: this entire forum is about helping people in Java.
ver few appreciate getting pm's and/or personal mails. the point is to ask questions in a (new) thread on this forum, so that everyone can benefit from the replies and sollutions that are provided by the members (and so more than just one person can help out). it's a bit the same concept as 'open source'.
stultuske
Industrious Poster
4,491 posts since Jan 2007
Reputation Points: 1,377
Solved Threads: 630
Skill Endorsements: 25
Aries86
DaniWeb Member Rules include
"Do not ask anyone (member or moderator) for help by email or PM"
http://www.daniweb.com/community/rules
Start a new topic in this forum for your Java question.
JamesCherrill
... trying to help
8,670 posts since Apr 2008
Reputation Points: 2,636
Solved Threads: 1,479
Skill Endorsements: 33