⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 item.java

📁 利用ajax技术
💻 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 + -