Hi, I have completed the homework for the Command Line Arguments topic but have a question before I submit my homework as I think there may be an easier way of doing it.
When calculating the average age we need to ignore every second parameter (first parameter, third parameter, fifth parameter, etc) as these are the names of the family members. To ignore the names I have included a try and catch error handling so when I convert to a number the names go to the catch error handler where the catch code does nothing so the names are ignored. This seems to work ok. My question is if anybody has a simpler solution to ignore the names and calculate only the ages? Many thanks, Brian Martin --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
