class TapeDeck {
boolean canRecord = false;
void playTape() {
System.out.println("Tape Player");
}
void recordTape() {
System.out.println("Tape Recording");
}
}
class TapeDeckTestDrive {
public static void main (String [] args) {
TapeDeck t = new TapeDeck();
t.canRecord = true;
t.playTape();
if (t.canRecord == true) {
t.recordTape();
}
}
}
收到错误消息,“线程“main”中的异常 java.lang.NoSuchMethodError: main”