Results 1 to 6 of 6
Thread: Help with "Hello World" Program
- 09-05-2008, 03:31 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 1
- Rep Power
- 0
Help with "Hello World" Program
Hi, this is my third day of java programming. Im trying to make the "hello world" program as my very first program and im having some problems. I made this program in school and it worked but i dont know why its not working on my own PC.
Heres the code
errors:Java Code:/** * @(#)Hello.java * * * @author * @version 1.00 2008/9/4 */ public class Hello { public static void main (string[] args) { system.out.println ("Hello"); } }
cannot find symbol class string line 13
package system does not exist line 15
- 09-05-2008, 05:23 AM #2
Senior Member
- Join Date
- May 2008
- Location
- Makati, Philippines
- Posts
- 234
- Rep Power
- 6
change string[] to String[]
Mind only knows what lies near the heart, it alone sees the depth of the soul.
- 09-05-2008, 05:45 AM #3
errors:
cannot find symbol class string line 13
As Eku wrote.
package system does not exist line 15
Change system.out.println to System.out.println
- 09-05-2008, 07:44 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Here is the correct code. Keep in mind that Java is case-sensitive.
Java Code:/** * @(#)Hello.java * * * @author * @version 1.00 2008/9/4 */ public class Hello { public static void main (String[] args) { System.out.println ("Hello"); } }
- 09-05-2008, 08:35 AM #5
Senior Member
- Join Date
- Aug 2008
- Posts
- 384
- Rep Power
- 5
The error messages say precisely what's wrong, learn to understand them.
I die a little on the inside...
Every time I get shot.
- 09-05-2008, 09:34 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Normally error message contain bit explanation on the error as well as the line.
Similar Threads
-
Hwlp with "Open", "Save", "Save as..."
By trill in forum New To JavaReplies: 3Last Post: 11-02-2010, 09:26 AM -
Help with "hello world"
By fogus in forum New To JavaReplies: 9Last Post: 12-29-2008, 10:18 PM -
<core:forEach var="" begin="+<%=j%>+">???
By freddieMaize in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-27-2008, 01:20 AM -
"Jumble" or "Scramble" Program
By Shadow22202 in forum Java AppletsReplies: 8Last Post: 04-30-2008, 03:42 AM -
Exception in thread "main" java.net.ConnectException: Connection timed out
By osval in forum Advanced JavaReplies: 1Last Post: 07-27-2007, 10:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks