Hi zaxxon25 (Please make it realistic),
I suppose the third data of Department number is fixed so you can use class scope
hashtable which will be populated only once, for the other data you can create a bean ( inner class or outer if your project permits)
class EmpTempData{
public EmpTempData(Hashtable deptNumbers){
this.deptNumber=deptNumbers;
}
private
String empName;
private ArrayList empDepartment;
/*
containing "deptName" and "deptNumber" pair
*/
private Hashtable deptNumbers;
//getter setter methods of empName,empDepartment and deptNumbers
// method to get department numbers corresponding to department name
public Hashtable getEmpDeptNameAndNumber(){
// implementation
}
}