Ok below is a code i have been trying to put together. I want there to be two seprate users that as dialog boxes pop up they enter their first name then last and then their age. Each user does that and then in the end i want to compare the ages and the last dialog box to say:
First Person: Smith, John (31) Second Person: Doe, Mike (35) Doe is older than Smith
So here is my code and i know i have serveral errors, can someone help me?
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ] [ September 09, 2004: Message edited by: Dirk Schreckmann ]
That's really not too bad. The main problem is that you're assigning the value returned from showInputDialog() directly to age1 and age2, which are integers. You'll need separate String variables to hold the String values, and pass those values to parseInt() and assign the return values of parseInt() to the ageX variables.
sort of...im a little lost? so i put the dialog boxes in string variables and ages in a different variable? sorry im a little a slow at this. im new so i dont really know what everything means i have to go and look it up.