📄 productweight.java
字号:
package pWeight;
public class ProductWeight
{ String product;
double weight;
public ProductWeight()//构造方法进行初始化
{ this.product="Y8015";
this.weight=32;
}
public void setProduct (String ProductName) //用于设置属性值的方法
{ this.product = ProductName; }
public String getProduct() //用于得到属性值的方法
{ return(this.product); }
public void setWeight (double WeightValue)
{ this.weight = WeightValue; }
public double getWeight()
{ return (this.weight); }
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -