Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 16th, 2005, 7:45 AM   #1
Kiwwa
Newbie
 
Join Date: Jun 2005
Posts: 7
Rep Power: 0 Kiwwa is on a distinguished road
New to Java - Compiling Error

Hey, i've recently had a lot of time on my hands, and have had a "Sams Teach Yourself Java 2 in 24 Hours" book sitting around for a lonnnng time.

I'm working through it, but have only made it so far as chapter 2, simply because I can't get either JCreator or NetBeans to compile basic java code.

class bigdebt {
	public static void main(String[] arguments) {
	int debt = 446000000;
	debt = debt / 1440;
	system.out.println("A minute's worth of debt is $" + debt);
	}
}
Can't really get simpler than that, huh?

Anyway, in both, I get the error
C:\Programming\Java\bigdebt.java:5: package system does not exist
        system.out.println("A minute's worth of debt is $" + debt);
              ^
1 error

Process completed.
I HAVE compiled this a few years ago, is this a problem with my installation of the JDK, or has Java just come SO far over the years?

Last edited by Kiwwa; Jun 16th, 2005 at 7:47 AM.
Kiwwa is offline   Reply With Quote
Old Jun 16th, 2005, 8:07 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
the System class is case sensitive, try
System.out.println("A minute's worth of debt is $" + debt);
The clue is in the error, "package system does not exist"
Dizz
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jun 16th, 2005, 8:11 AM   #3
Kiwwa
Newbie
 
Join Date: Jun 2005
Posts: 7
Rep Power: 0 Kiwwa is on a distinguished road
Ah, I see, i'll be more careful with my capitalisation in the future.
Kiwwa is offline   Reply With Quote
Old Jun 16th, 2005, 8:15 AM   #4
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
Java can be tricky like that, especially with included classes and functions. Luckily the error messages are clear..
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Jun 16th, 2005, 10:25 AM   #5
skuinders
Hobbyist Programmer
 
skuinders's Avatar
 
Join Date: Jun 2005
Location: MA, US
Posts: 204
Rep Power: 4 skuinders is on a distinguished road
Quote:
Originally Posted by Kiwwa
Ah, I see, i'll be more careful with my capitalisation in the future.
attention to case is a good habit to have in the world of computers... especially if you ever plan to work with *nix.
__________________
"A stupid man's report of what a clever man says can never be accurate, because he unconciously translates what he hears into something he can understand."
- B. Russell

http://web.bryant.edu/~srk2
skuinders is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:38 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC