| Author |
GUI and Strings
|
Graham Robinson
Greenhorn
Joined: Nov 23, 2005
Posts: 16
|
|
Can't work out how to take them in, I've had it so it will work out the pounds to kilos, but can't seem to send it down. I've tried a few different strimgs etc, here is the code.
|
 |
Joanne Neal
Rancher
Joined: Aug 05, 2005
Posts: 3011
|
|
Use String.equals() method to compare Strings, not == eg
|
Joanne
|
 |
Murad Iqbal
Ranch Hand
Joined: Dec 09, 2003
Posts: 90
|
|
1. What are you comparing 'name' and 'kilo' with? 'p' and 'k' are empty strings isnt it? So I suggest initialize them with something you would want to compare them with 2. As told earlier, for String comparison use .equals() method from the String class.
|
 |
Graham Robinson
Greenhorn
Joined: Nov 23, 2005
Posts: 16
|
|
|
Cheers, it works.
|
 |
 |
|
|
subject: GUI and Strings
|
|
|