Skip to Main Content

Java SE (Java Platform, Standard Edition)

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!

I am using JOptionPane

843805Mar 9 2007 — edited Mar 10 2007
I am trying to use char like I usually use doble but doesnt work

Here is using double:
lb = JOptionPane.showInputDialog("Enter the pounds: ");
    			pounds = Double.parseDouble(lb);
Here is using char:
message = JOptionPane.showInputDialog("Welcome to Converting Weight System!\n"
    					+ "Please enter P to convert your kilograms weight to Pounds "
    					+ "or K to convert your pounds weight to Kilograms: ");
    	choice = Character.parseChar(message);
Probably when you use char is different but I dont know how, can some one help me please.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2007
Added on Mar 9 2007
10 comments
2,390 views