Java Setup Problem?

Using the Java SDK with TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
laingden
Posts: 2
Joined: Thu Aug 28, 2003 3:55 pm

Java Setup Problem?

Post 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
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post 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
laingden
Posts: 2
Joined: Thu Aug 28, 2003 3:55 pm

Oops sorry for wasting your time...

Post by laingden »

Oops, Sorry for wasting your time.
No more coding early in the morning for me. :oops:

Denise
Post Reply