Unnamed
public text v1 · immutablepublic class Payroll {
public static int MAX_STAFF=2;
//create the staff objects
static Staff[] staff = new Staff[MAX_STAFF];
public static void main( String[] args ) {
System.out.println("Payroll for this week:");
System.out.println("======================");
Payroll p = new Payroll();
p.printPay();
}
/**
* Print the pay for each staff member
*/
public static void printPay() {
System.out.println(staff[MAX_STAFF].toString());
}
}//Payroll