내가 스칼라에서이 작업을 수행하기 위해 노력하고있어,하지만 어떤 이유로도스칼라 상속과 객체 생성
abstract class Room {
...
}
class RoomA1 extends Room { //"not found: type Room"
//but they're in the same package!!!
//and if I import it as Eclipse suggests the import declaration will give
//"Room is not a member of rooms(rooms.type)"
...
}
및 작동하지 않습니다 ... 사람이있는을 위해
var room = new Array[Room](2)
room(0) = new RoomA1 //gives a type mismatch
//how can I accomplish this?
"abstract Class Room"이라고 썼습니다. 그것은 "클래스"가 아니라 "클래스"여야합니다. 댓글이나 프로그램에 오타가 있습니까? – vbezhenar
twas는 오타입니다. – adrianton3