Java

  1. Home
  2. Computing & Technology
  3. Java

Subclass

By Paul Leahy, About.com

Definition: A subclass is a class that extends another class. The subclass inherits the state and behaviors of the class it extends.
Also Known As: derived class, child class
Examples:

Imagine you define a Person class:

public class Person
{

}

A new class can be created by extending the Person class. Here the Employee class is a subclass of the Person class:

public class Employee extends Person
{

}

Glossary:

# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Explore Java

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

Java

  1. Home
  2. Computing & Technology
  3. Java
  4. Java Glossary
  5. S
  6. Definition for the Term: Subclass

©2009 About.com, a part of The New York Times Company.

All rights reserved.