bookdetails.java
来自「jsp 应用开发技术光盘 是《jsp应用开发技术》这本书的源代码」· Java 代码 · 共 100 行
JAVA
100 行
package database;public class BookDetails implements Comparable { private String bookId = null; private String title = null; private String name = null; private float price = 0.0F; private boolean onSale = false; private int year = 0; private String description = null; private int inventory = 0; public BookDetails() { } public BookDetails(String bookId, String name, String title, float price, boolean onSale, int year, String description, int inventory) { this.bookId = bookId; this.name = name; this.title = title; this.price = price; this.onSale = onSale; this.year = year; this.description = description; this.inventory = inventory; } public String getBookId() { return this.bookId; } public String getTitle() { return this.title; } public String getName() { return this.name; } public float getPrice() { return this.price; } public boolean getOnSale() { return this.onSale; } public int getYear() { return this.year; } public String getDescription() { return this.description; } public int getInventory() { return this.inventory; } public void setBookId(String id) { this.bookId = id; } public void setTitle(String title) { this.title = title; } public void setName(String name) { this.name = name; } public void setPrice(float price) { this.price = price; } public void setOnSale(boolean onSale) { this.onSale = onSale; } public void setYear(int year) { this.year = year; } public void setDescription(String description) { this.description = description; } public void setInventory(int inventory) { this.inventory = inventory; } public int compareTo(Object o) { BookDetails n = (BookDetails) o; int lastCmp = title.compareTo(n.title); return (lastCmp); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?