Подскажете, что я сделал не так? public RoadObject createRoadObject(RoadObjectType type, int x, int y){ Thorn(int x, int y){ } if(type == RoadObjectType.THORN) { return new Thorn(); } if(type != RoadObjectType.THORN){ return null; } }