阅读背景:

object是类的实例(java)

来源:互联网 
System.out.print("Enter Room Number: ");
int a4 = scan.nextInt();
scan.nextLine();
booking[count]= new RoomBooking (a1,a2,a3,a4);
count++;

if (/* if the object is an instance of RoomBooking(subclass) */) {
    for (int y = 0; y < count; y++) {
        if (a4 == (((RoomBooking) booking[y]).getRoomNumber())) {
            System.out.print("Used number, Please Try again");
        }
    }
}
System.out.print("Enter Room Number: ");
int a4



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: