类型不匹配:无法从元素类型对象转换为员工

时间:2018-08-08 09:02:33

标签: spring

在我的java类中使用此代码时,它显示错误

    //Get all the Employees
    List employeeList = dao.getAllEmployees();
    System.out.println("*** List of all Employee ***");
    for(Employee emp2 : employeeList)
    {
        System.out.println("Employee ID   ::"+emp2.getId());
        System.out.println("Employee Name ::"+emp2.getName());
        System.out.println("Employee Age  ::"+emp2.getAge());
        System.out.println("Deptartment   ::"+emp2.getDept());
        System.out.println(" *********************");            
    }
    System.out.println();

0 个答案:

没有答案