Something wrong with really,really simple code.
Hello. I was making a Java application,when,suddenly,Eclipse didn't accept my System.out.println();
I then made a simple 'Hello World!' application to demonstrate.
Code :
public class main {
System.out.println("Hello planet!");
}
Any help will be greatly appreciated.
EDIT: I found out why it isnt working now. I forgot to make the 'main' method.
Re: Something wrong with really,really simple code.
Quote:
Originally Posted by
Programmer142
EDIT: I found out why it isnt working now. I forgot to make the 'main' method.
Yep. Errors like this are easier to catch if you stick with the standard naming conventions- classes should start with an upper-case letter, methods and variables with lower-case letters. That way, errors like this stick out even better.
Re: Something wrong with really,really simple code.
How do I archive this thread...or delete it...or something similar?
Re: Something wrong with really,really simple code.
Quote:
Originally Posted by
Programmer142
How do I archive this thread...or delete it...or something similar?
You don't. Part of the point of these forums is so users with similar problems in the future can learn from old posts that have been solved. That's one of the reasons using descriptive titles and posting accurate, detailed information is so important.