Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Double.parse.double()

807598Oct 17 2006 — edited Oct 17 2006
I am new to Java and am having difficulty with a program I am writing. In the program the user is asked for numerical input which is then parsed to a double. Everything works fine until the user enters a character at which point it bypasses the else (used to catch unwanted numerical values) and gives me an error.

I have found no way to verify that the parsed double is actually a double.

Any help appreciated,

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2006
Added on Oct 17 2006
5 comments
299 views