Page 1 of 1

Java Setup Problem?

Posted: Thu Aug 28, 2003 4:03 pm
by laingden
Hi,

I just installed java and then Textpad on a computer and I think there may be a problem with the setup. I created a very simple class to test that it could run. The code is as follows:
public class test
{
System.out.println("Hi");
}

When compiled I get the following errors:

test.java:3: <identifier> expected
System.out.println("Hi");
^

java:3: cannot resolve symbol
symbol : class out
location: class java.lang.System
System.out.println("Hi");
^

Please help!

Thanks in advance,
Denise

Posted: Thu Aug 28, 2003 5:03 pm
by MudGuard
what sense should that make, to call a method in the class definition?

You should define a method (e.g. main) in your class, and put the call to System.out.println in there

Oops sorry for wasting your time...

Posted: Thu Aug 28, 2003 5:35 pm
by laingden
Oops, Sorry for wasting your time.
No more coding early in the morning for me. :oops:

Denise