mygolfball.java
来自「Practical Java也是一本和J2ME手机游戏开发相关的书」· Java 代码 · 共 30 行
JAVA
30 行
class MyGolfball extends Golfball
{
public final static byte TwoPiece = 0;
public final static byte ThreePiece = 1;
private byte ballConstruction;
public MyGolfball(String str, String mk,
int comp, byte construction)
{
super(str, mk, comp);
ballConstruction = construction;
}
public byte construction()
{
return ballConstruction;
}
public boolean equals(Object obj)
{
if (super.equals(obj))
{
MyGolfball gb = (MyGolfball)obj;
if (ballConstruction == gb.construction())
return true;
}
return false;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?