Free Sample: while i execute the above code i get this exception java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.beans.EmployeePm paper example for writing essay

while i execute the above code i get this exception java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.beans.EmployeePm - Essay Example

What is the code to retrieve data from the list while i execute the above code i get this exception java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.beans.EmployeePm

public String showEmpHome(ModelMap map) {
System.out.println(“inside showEmpHome/empHomeController”);
EmployeePm empPm = new EmployeePm();

int empCode = Integer.parseInt(htSession.getAttribute(“empCode”).toString());//get empCode from session

List<EmployeePm> list = empHomeSer.getEmpHome(empCode);
System.out.println(“List size=” + list.size());

for (int i = 0; i < list.size(); i++) {

System.out.println(“fddfg = “+list.get(i));
String wrk = list.get(i).getWorkAssigned().toString();
System.out.println(“work = “+wrk);
}

map.addAttribute(“tabList”, list);
System.out.println(“end of showEmpHome/empHomeController”);
return “empHome”;
}