+5 votes
484 views
in Programming by (990 points)
I want to know the concepect of super class in java?

1 Answer

0 votes
by Expert (5.1k points)

A superclass is a class that has been extended by another class. It allows the extending class to inherit its state and behaviors.

 

 

example:

public class Person

 {
 
 } 

A new class can be created by extending this class:

 public class Employee extends Person
 {
 
 } 

The Person class is said to be the superclass of the Employee class.

hope you got the point!

Not a Member yet?

Ask to Folks Login

My Account

Your feedback is highly appreciated