forum

Home / DeveloperSection / Forums / I have started with java but compiler gives erroer

I have started with java but compiler gives erroer

Anonymous User 1760 12-Nov-2014

As you can tell I am just starting out, but I have been told I will probably be good at it

public class HelloWorld {
    public static void main(string[] args) {
        system.out.println("Hello world") ;
    }
}

the compiler says

"HelloWorld.java:3: error: cannot find symbol

    public static void main(string[] args) {

                            ^

  symbol:   class string

  location: class HelloWorld

HelloWorld.java:5: error: package system does not exist

        system.out.println("Hello world") ;

              ^

2 errors"

will somebody please explain to me what is wrong


Updated on 13-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By