Java program to test SUPER CLASS

Utsav Verma / / 0
In Java, it is possible to inherit attributes and methods from one class to another. We group the "inheritance concept" into two categories:
  • subclass (child) - the class that inherits from another class
  • superclass (parent) - the class being inherited from

To inherit from a class, use the extends keyword

In the example below, the Circle class (subclass) inherits the attributes and methods from the Area class (superclass):

File Name - Final_area.java




Output -



Utsav Verma


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut odio. Nam sed est. Nam a risus et est iaculis adipiscing. Vestibulum ante ipsum faucibus luctus et ultrices.
Follow me @Bloggertheme9

0 comments:

About Me

My photo
I work as an Analyst in HCL Technologies. Android App Development is my hobby. As a passionate technology lover, you need to keep yourself updated with trending technologies. The best way to learn and stay up to date is simply to do something creative. I’ve a number of small personal app projects and each one have been rewarding and useful in one way or the other.