可能重複:
When to use an interface instead of an abstract class and vice versa?
Difference between Interface, abstract class, sealed class, static class and partial class in C#?抽象類和接口有什麼區別?你想什麼時候使用它們?
public class Guru{
public Enemy(int x, int y, int health, int attack, ...) {
...
}
...
}
public class UserDefinedClass extends Enemy {
...
}
歡迎來到StackOverflow,但此問題已被提問(和回答)之前(請參閱「相關」邊欄) –