Abstract
Abstract classes are similar to interfaces in many ways. They can both define method signatures that subclasses must implement, and neither one of them can be instantiated. One key difference is that an abstract class can contain any abstract or non-abstract member, whereas an interface is limited to abstract members, nested types, and static constants, as well as static methods and default methods as of Java 8. Another difference is that a class can implement any number of interfaces but only inherit from one class, abstract or not.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Mikael Olsson
About this chapter
Cite this chapter
Olsson, M. (2018). Abstract. In: Java Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3441-9_18
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3441-9_18
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3440-2
Online ISBN: 978-1-4842-3441-9
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)