saxbook.java
来自「java2 primer plus一书源程序」· Java 代码 · 共 68 行
JAVA
68 行
public class SAXBook
{
private String title;
private String author;
private String category;
private float price;
public SAXBook()
{
}
public SAXBook( String title,
String author,
String category,
float price )
{
this.title = title;
this.author = author;
this.category = category;
this.price = price;
}
public String getTitle()
{
return this.title;
}
public void setTitle( String title )
{
this.title = title;
}
public String getAuthor()
{
return this.author;
}
public void setAuthor( String author )
{
this.author = author;
}
public String getCategory()
{
return this.category;
}
public void setCategory( String category )
{
this.category = category;
}
public float getPrice()
{
return this.price;
}
public void setPrice( float price )
{
this.price = price;
}
public String toString()
{
return "Book: " + title + ", " + category + ", " + author + ", " + price;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?