---
title: "Super method in java"  
description: "It is a keyword in java used to access members of a class inherited by the class in which it appears. Super method is use to transfer the message or d"  
author: "Amit Singh"  
published: 2011-10-11  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/252/super-method-in-java  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# Super method in java

It is a keyword in [java](https://www.mindstick.com/articles/12214/web-development-company-in-india-laid-on-the-foundation-of-concrete-java-programming) used to [access](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china) members of a [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) inherited by the class in which it appears. Super [method](https://www.mindstick.com/forum/166/webservice-method) is use to [transfer](https://www.mindstick.com/blog/11733/debt-management-for-startups-consolidation-loan-vs-balance-transfer) the [message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net) or data to their super class (it refers to a class from which a particular class (subclass) is derived.) constructor to initialize their data.\

##### Example

this is the [simple](https://yourviews.mindstick.com/story/1469/5-simple-ways-to-stay-fit-amp-healthy) demonstration, how to use [super keyword](https://answers.mindstick.com/qa/92536/what-is-the-super-keyword) in java.

```
Class Person{                String name,address;                int age;                                Person(String userName,String add, int userAge)                {                                name=username;                                address=add;                                age=userAge;                }                void show()                {                                System.out.println(name);                                System.out.println(address);                                System.out.println(age);                }}Class Employee extends Person{                int empCode,empSal;                                Employee(String name, String add, int u_age,int code,int sal)                {                                Super(name,add,age):                                empCode=code;                                empSal=sal;                                void show1()                                {                                                show();                                                                                                System.out.println(code);                                                System.out.println(sal);                                }                                Public Static void main(Strings args[])                                {                                                Employee e=new Employee(“davis”,”newHoles”,27,001,4000);                                                e.show1();                                }  }
```

---

Original Source: https://www.mindstick.com/blog/252/super-method-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
