?? golfball.java
字號:
class Golfball
{
private String brand;
private String make;
private int compression;
public Golfball (String str, String mk, int comp)
{
brand = str;
make = mk;
compression = comp;
}
public String brand()
{
return brand;
}
public String make()
{
return make;
}
public int compression()
{
return compression;
}
public boolean equals(Object obj)
{
if (this == obj)
return true;
if ((obj != null) && (getClass() == obj.getClass()))
{
Golfball gb = (Golfball)obj;
if ((brand.equals(gb.brand())) &&
(make.equals(gb.make())) &&
(compression == gb.compression()))
{
return true;
}
}
return false;
}
//...
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -