Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Something wrong with really,really simple code.

  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    My Mood
    Bored
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question 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.

    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.
    Last edited by Programmer142; November 29th, 2011 at 12:01 PM.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,342
    My Mood
    Hungover
    Thanks
    143
    Thanked 625 Times in 536 Posts

    Default Re: Something wrong with really,really simple code.

    Quote Originally Posted by Programmer142 View Post
    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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Nov 2011
    Posts
    4
    My Mood
    Bored
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Something wrong with really,really simple code.

    How do I archive this thread...or delete it...or something similar?

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,342
    My Mood
    Hungover
    Thanks
    143
    Thanked 625 Times in 536 Posts

    Default Re: Something wrong with really,really simple code.

    Quote Originally Posted by Programmer142 View Post
    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.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. I'm either doing this entirely wrong or I'm missing something simple.
    By xionyus in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 14th, 2011, 08:56 AM
  2. What's Wrong With My Code?
    By arunjib in forum What's Wrong With My Code?
    Replies: 18
    Last Post: May 7th, 2011, 08:47 PM
  3. What's wrong with simple Scanner program?
    By SV25 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 21st, 2011, 07:05 AM
  4. Wrong code
    By whattheeff in forum What's Wrong With My Code?
    Replies: 2
    Last Post: March 4th, 2011, 04:30 PM
  5. what's wrong in this code
    By Aravind in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 4th, 2011, 02:38 AM