?? item.java
字號:
package developerworks.ajax.store;import java.math.BigDecimal;public class Item { private String code; private String name; private String description; private int price; public Item(String code,String name,String description,int price) { this.code=code; this.name=name; this.description=description; this.price=price; } public String getCode() { return code; } public String getName() { return name; } public String getDescription() { return description; } public int getPrice() { return price; } public String getFormattedPrice() { return "$"+new BigDecimal(price).movePointLeft(2); } public boolean equals(Object o) { if (this == o) return true; if (this == null) return false; if (!(o instanceof Item)) return false; return ((Item)o).getCode().equals(this.code); }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -