public Student(Map
map){ this.id = (int)map.get("id"); this.stuName = (String)map.get(stuName); this.age = (int)map.get("age"); this.gender = (int)map.get("gender"); this.address = (String)map.get(address); } Cannot cast from Object to int不知道怎么调试,object>this.id = (int)map.get("id"); this.stuName = (String)map.get(stuName)前面id加了“”为啥后面的都不加 。this.id = (int)map.get("id"); this.stuName = (String)map.get("stuName")都加""试试。