book.java

来自「beginJsp2.0外文书籍源代码」· Java 代码 · 共 38 行

JAVA
38
字号
package com.wrox.shop;/** * Models a Book offered by the publisher. */public class Book {        private String title;    private double price;        /**     * Constructs a new Book     * @param title The book's title.     * @param price The book's retail price.     */        public Book(String title, double price) {        super();        this.title = title;        this.price = price;    }        /**     * Retrieves the title     * @return The title.     */    public String getTitle() {        return this.title;    }        /**     * Retrieves the retail price.     * @return The retail price.     */    public double getPrice() {        return this.price;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?