Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
convert string into int
Joined: Oct 28, 2004
Apr 06, 2005 01:45:00
i have one problem....
i have a
which actually an integer...because it was selected from a string...
eg : i buy 2 cakes
the selected substring is 2(name as select)
i need to compare it...if select is less then 0....then it will instantiate to 0....where it will the gives the output as
i buy 0 cake...
the problem is....i cant do the comparison because 2 is not an integer...its a string.....
can anybody help me solve this problem
Joined: Mar 11, 2002
Apr 06, 2005 02:05:00
Convert the String to an int and do the comparision
Integer.parseInt(String s) //will return an int
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: convert string into int
comparing and sorting arraylist of arraylist
Hibernate: native query to wrap the collection
column heading dates ...
enum + select on Struts 2
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013