Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > The Zelaron Nexus > Science and Art > Tech Help

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next

 
Reply
Posted 2009-05-11, 08:26 AM in reply to osmoses-jones's post "java help"
I can't see anything that would give you a problem if your input is right - that is, if the user enters a number. If they enter a letter or any other character, however, then you'll get a NumberFormatException. What's the error that you keep on getting (and which line?)? Btw, which program are you using to program in?

Have you done anything about exceptions, and using Try and Catch yet, or anything about defensive programming?

EDIT: If you've not done exceptions and try/catch, then I won't bother giving you an answer with them - it'll just serve to confuse you until you learn about them.

I got a happy feeling inside when I saw the code, by the way - that's one of the first things I was taught when I was learning VB.

Oh, and what SYG suggests will make your code look prettier, but not much else (which isn't a bad thing - pretty code is always much easier to read than unpretty code).

Last edited by Lenny; 2009-05-11 at 08:34 AM.
Old
Profile PM WWW Search
Lenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basicsLenny simplifies with no grasp of the basics
 
 
Lenny
 



 

Bookmarks

« Previous Thread | Next Thread »

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

Posting Rules [Forum 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
JAVA help platnum Tech Help 2 2006-04-10 05:31 AM
Java and C#? pr0xy Tech Help 8 2005-02-08 07:13 AM
Programming Faq Demosthenes Tech Help 4 2004-10-25 04:43 PM
Java help Ganga Tech Help 12 2004-02-02 02:15 PM
Java Script help Dhelds Tech Help 0 2003-01-14 05:07 PM


All times are GMT -6. The time now is 08:01 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.