What is a subclass?
Ans : A subclass is a class defined as an extension or modification of another class. Except for the Object class in the java.lang package, every class in the Java language is a subclass of some other class (called its immediate superclass, or superclass for short). A subclass behaves like its superclass, except where it speci-fies extensions or modifications. A subclass can extend its superclass by defining additional instance variables and methods for the subclass instances, or by defining additional class variables and class methods for the subclass. A subclass can also modify the behavior of its superclass by replacing some of the superclass’s method definitions with its own. In both cases, the Java language uses the extends keyword to declare subclass relationships. In the JDK (1.0.2 and 1.1), for example, the FileInputStream class in the java.io package is defined as a subclass of InputStream: /* in FileInputStream.java (JDK 1.0.2 and 1.1): */ public class FileInputStream extends
Related Questions
- I have applied for a Subclass 485 visa and have completed an Australian Qualification Framework (AQF) III, IV or Diploma. How will I be affected by the priority processing Direction?
- Why is a distinction made between IgG subclass deficiency and Specific Antibody Deficiency?
- How long is a Prospective Marriage, subclass 300, visa valid for?