import java.util.*;
public abstract class Player {
abstract String nm;
public abstract void displayDetails();
}
class Booking extends Player {
nm = "Sam";
void displayDetails() {
System.out.println("Name is:" + nm);
}
}
//代碼產生錯誤:identifier expected nm =「sam」;錯誤:<identifier>期望nm =「Sam」;
你有問題嗎? – csmckelvey
在'java'中'abstract String'有效嗎? – GoldRoger
我很抱歉我的那個錯誤... –