答案 0 :(得分:1)
您可以使用以下内容:
public class ship{
byte x,y;
byte []length;
boolean direction;
public ship(byte x, byte y, byte length, boolean direction)
{
this.x=x;
this.y=y;
this.length=new byte [length];
this.direction=direction;
}
}