What is the purpose of an abstract method?
问题 abstract public class car { abstract void drive(); } As in the code snippet above, what exactly is the purpose of an abstract method in Java? From what I can gather, by definition, they aren't allowed to have bodies. 回答1: When you make things implement the same abstract class, you are saying, these things are alike at a high level, but they vary in the particulars of how they do things. An abstract method is how you say, "Here's something that all the things that extend this class have to do,