Search the Community
Showing results for tags 'calling other method'.
Basically what I am trying to do is, first you enter a number, which will be the number of time the loop should run. When all details entered, it should print out like a payslip for all entries, name, wage, marital status etc..Now the problem is, when I enter example 2 for the loop(numWorkers) at the last round, it will come up with some error in the line of nameWorker[i] = input.next(); Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 20. Also got some problem with the wage obviously im trying to send a double to the wageCalc method, but just cant get it running. Tried p