I'm trying to make a Tetris game and I'm getting the compiler error
Shape is not an enclosing class
when I try to create an object
public class Test {
public static void main(String[] args) {
Shape s = new Shapes.ZShape();
}
}
I'm using inner classes for each shape. Here's part of my code
public class Shapes {
class AShape {
}
class ZShape {
}
}
What am I doing wrong ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…