---
title: "What are the base class, sub class, and superclass?"  
description: "What are the base class, sub class, and superclass?"  
author: "Shikhar Arora"  
published: 2019-12-07  
canonical: https://answers.mindstick.com/qa/92538/what-are-the-base-class-sub-class-and-superclass  
category: "technology"  
tags: ["software engineering", "programming language"]  
reading_time: 1 minute  

---

# What are the base class, sub class, and superclass?

What are the [base class](https://www.mindstick.com/interview/1817/what-is-a-base-class), sub class, and superclass

## Answers

### Answer by Sangsaptak Pal

The [base](https://www.mindstick.com/interview/311/whait-is-the-super-in-java) [class](https://www.mindstick.com/articles/12089/arrays-in-java-determining-class-of-an-array-part-8), sub class and super class are concepts used in polymorphism. Polymorphism is one of the many features that are provided by OOPS (Object Oriented Programming)

A base class is a class from which other classes are obtained. It helps in creation of other classes which can implicitly and elegantly reuse code.

A sub class is a class that inherits from the base class or super class. It reuses the code from the base class.

Super class is a class from which all other classes inherit.

For instance, let us consider the example of birds. Suppose we have a class named BIRD. This BIRD class is the base class whereas all the other classes like PARROT, CROW and all are sub classes of the BIRD class. Again, the BIRD class is the superclass of PARROT, CROW and all.


---

Original Source: https://answers.mindstick.com/qa/92538/what-are-the-base-class-sub-class-and-superclass

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
