Hi Ben,

You can use the static method parseInt from the Integer class to convert the
String to an integer and then you can compare.
For example:

String age = "10";
int myAge = Integer.parseInt(age);

Regards,
Babu

On Wed, Jul 22, 2009 at 10:02 PM, ben <[email protected]> wrote:

>
> hi all,
>
> i want to know how to compare strings...
> for example if i get the age as a string... how can i compare them and
> get the largest value to print...
>
> thanks
>
> ben...
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to