Java 父抽象类中的变量是否由子类继承?

Java 父抽象类中的变量是否由子类继承?,java,abstract-class,Java,Abstract Class,好的,那么子类的每个实例,即扩展了Tetrimino的J_Tetrimino类,是否会得到自己的int[][]向上和字符串方向 public abstract class Tetrimino { // [row][col] /*The size of the area a tetrimino needs*/ protected final int TETRIMINO_SPACE_SIZE = 3; /*The upwards and initial orientation of the J

好的,那么子类的每个实例,即扩展了Tetrimino的J_Tetrimino类,是否会得到自己的int[][]向上和字符串方向

public abstract class Tetrimino {

// [row][col]

/*The size of the area a tetrimino needs*/
protected final int TETRIMINO_SPACE_SIZE = 3;

/*The upwards and initial orientation of the J tetrimino*/
protected int[][] UP;

/*The left and second orientation of the J tetrimino*/
protected int[][] LEFT;

/*The down and third orientation of the J tetrimino*/
protected int[][] DOWN;

/*The right and fourth orientation of the J tetrimino*/
protected int[][] RIGHT;

protected String orientation = "UP";

public String getCurrentOrientation() {
    return orientation;
}

对。发布的抽象类的具体实现的每个实例都将获得自己的这些字段实例。它们都不是静态的,这会使它们共享。另外,它们都受
保护
,因此它们在子类中可见(除非它们被隐藏)。

谢谢,这正是我想知道的!