📄 product.java
字号:
import com.sun.org.apache.bcel.internal.generic.NEW;
public class Product {
private String code;
private String description;
private double price;
public Product() {
// TODO Auto-generated constructor stub
}
public Product(String initialCode,
String initialDescription,
double initialPrice){
this.code = initialCode;
this.description = initialDescription;
this.price = initialPrice;
}
public String getCode(){
return this.code;
}
public String getDescription(){
return this.description;
}
public double getPrice(){
return this.price;
}
public boolean equals(Product object){
return (this.code == object.getCode());
}
public String toString (){
return this.getCode()+"_"+this.getDescription()
+"_"+this.getPrice();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -