Loading topic
abstract keyword changes, and what the compile4 min readabstract. That keeps anyone from creating an object of it directly. An abstract class becomes much more useful once it holds abstract methods. This chapter covers what an abstract method is, how to write one, and which rules the Java compiler chec4 min readnew with it. To get a real object, you need a concrete subclass. A concrete subclass is an ordinary class that extends an abstract class and provides a body for every abstract method it inherits.4 min readnew. That might make you think an abstract class is only a list of empty promises. It is not. An abstract class can hold real data, run real setup code, and share working methods with every subclass. This chapter shows h4 min readShape or a Drawable and does not care which class sits behind it. This chapter adds one more idea: a single class can make several promises at the same time.4 min readpublic, static, or final that changes how a field or method behaves. "Implicit" means Java adds it for you, even if you do 5 min read