Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Very simple java program not working!

  1. Nov 12, 2012 #1
    I am using the netbeans IDE

    All I am trying to do is print out to the screen, but I keep getting this error.

    Code (Text):
    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: system.out.println
        at mysqlconn.mainhgf4.main(mainhgf4.java:19)
    Here is my short code

    Code (Text):
    package mysqlconn;
    import java.io.BufferedReader;
    /**
     *
     */
    public class mainhgf4{

        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
           
           system.out.println("Welcome friend!!");
        }
    }
     
    This is not really a java program, it is a SQL program that I am supposed to somehow implement a DB in java... IDK im so frustrated over this. I am originally a C programmer and have very basic knowledge of java, but the fact that I have to incorporate a database and SQL queries is making this impossible for "ME", I know alot of people can do this with their eyes closed.
     
  2. jcsd
  3. Nov 12, 2012 #2

    DavidSnider

    User Avatar
    Gold Member

    Try System.out.println(...)
     
  4. Nov 12, 2012 #3

    gabbagabbahey

    User Avatar
    Homework Helper
    Gold Member

    Java is a case-sensitive language, and by convention, class names (like System), start with an upper-case letter, whereas variable and method names start with a lower-case letter (like out & println() )
     
  5. Nov 13, 2012 #4
    Ahh wow that was simple lol thank you, I might be back for more questions because if I had trouble with that then there is no telling how many problems I am going to run across lol
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Very simple java program not working!
  1. Simple Java Program Help (Replies: 18)

Loading...