public class StudentBuy { private String studentNo; private String studentName; private String isbn; private String bookName; private Date createTime; @Override public String toString() { return "StudentBuy{" + "studentNo='" + studentNo + '\'' + ", studentName='" + studentName + '\'' + ", isbn='" + isbn + '\'' + ", bookName='" + bookName + '\'' + ", createTime=" + createTime + '}'; } public String getStudentNo() { return studentNo; } public void setStudentNo(String studentNo) { this.studentNo = studentNo; } public String getStudentName() { return studentName; } public void setStudentName(String studentName) { this.studentName = studentName; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public String getBookName() { return bookName; } public void setBookName(String bookName) { this.bookName = bookName; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } }
时间: 2024-02-10 22:22:24 浏览: 68
MySQL基础@@@@@@@@@@
这是一个 Java 类,名为 StudentBuy,它代表了学生购买书籍的记录。该类包含了学生学号(studentNo)、学生姓名(studentName)、书籍 ISBN(isbn)、书籍名称(bookName)和购买时间(createTime)等属性。该类还覆盖了 toString 方法,用于将该对象转化为字符串以便打印输出。该类的属性都提供了 get 和 set 方法,用于获取和设置属性的值。
阅读全文