ok I can parse the array with the StringTokenizer.
But now I am stumped on how to iterate through the array with a loop.
This is my code but it only displays the first string 5 times instead of all five strings.
I added to more variables...
String strHoursWorked;
String strHourlyRate;
for (int index=0; index < employees.length; index++)
{
StringTokenize employee=new StringTokenizer(employee[0]);
firstName=(employee.nextToken(":");
lastName=(employee.nextToken(":");
strHoursWorked=(employee.nextToken(":");
strHourlyRate=(employee.nextToken(":");
hoursWorked=Integer.parseInt(strHoursWorked);
hourlyRate=Double.parseDouble(strHourlyRate);
weeklyPay=hoursWorked * hourlyRate;
}
System.out.println(firstName + " " + lastName + ":" + currency.format(weeklyPay));
Any ideas on what I am doing wrong with this loop???