This is my first attempt at java
here it is
public class Welcome {
public static void main(String[] args){
System.out.println("Welcome to java");
}
}
however when i compile it i get this error
C:\Java>javac Test.java
Test.java:3: package system does not exist
system.out.println("This is a test");
^
1 error
what am i doing wrong
Adam - 18 Sep 2004 21:12 GMT
> public class Welcome {
> public static void main(String[] args){
[quoted text clipped - 11 lines]
>
> what am i doing wrong
The code at the top seems ok, but below it looks like you've spelt 'system'
with a lowercase 's'.
it needs to be System with capital S.
adam
Gary Redmond - 18 Sep 2004 21:34 GMT
the code down below is what the command line is giving back to me
>> public class Welcome {
>> public static void main(String[] args){
[quoted text clipped - 18 lines]
>
> adam
Gary Redmond - 18 Sep 2004 21:36 GMT
sorry my mistake it works fine now thanks
> the code down below is what the command line is giving back to me
>
[quoted text clipped - 20 lines]
>>
>> adam
Hal Rosser - 18 Sep 2004 22:19 GMT
> public class Welcome {
> public static void main(String[] args){
[quoted text clipped - 11 lines]
>
> what am i doing wrong
You should have named the file "Welcome.java" - not Test.java - the file
name and class name should be the same here.
You are compiling "Test.java"
-- by the way, the error message indicates you did not use upper-case S in
"System"
if you rename the file "Welcome.java"
and compile using "javac Welcome.java
you'll hava better luck
=====================