I'm a newbie when it comes to Java and I'm trying to get my head a round a few things.
I curently have the following method:
Expand|Select|Wrap|Line Numbers
- private static void runReport(Department deptIn){
- System.out.printf("Salary Report for department: " + deptIn.getName() + "\n") ;
- System.out.printf(deptIn.getManager() +"(Manager) \n");
- for(int i = 2; i < deptIn.getStaff().length; i++){
- System.out.printf("%f",deptIn.getEmployee(i));
- }
I've been reading the API and I'm confused by it all so I thought I'd shout for help.
Basically deptIn.getEmployee returns an employee object and the toString method is called to generate a string that contains the employee name and the salary.
Any suggestions? Or do you need more info?
Cheers
nathj