日期:2014-05-16 浏览次数:21140 次
1、Mysql准备数据(use itcast数据库)
(20), lastname?varchar
(20));
2、准备POJO类
public
?class
?Student?implements
?java.io.Serializable {
??private
?static
?final
?long
?serialVersionUID = 1L;
??private
?Integer id;
??private
?String firstname;
??private
?String lastname;
??public
?String getFirstname() {
????return
?firstname;
??}
??public
?void
?setFirstname(String firstname) {
????this
.firstname = firstname;
??}
??public
?Integer getId() {
????return
?id;
??}
??