answersLogoWhite

0

The keyword super is used to refer to the parent class instance of the current class.

Lets say we have a class

class A extends B {

...

public void getName(){

}

...

}

Lets assume the parent class B also has a method getName()

Inside class A if you call getName() it would by default call the current class's method. To make the JVM intentionally call the super class method we can use super

if we say super.getName() then the parent class instance of the method would be called.

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

Can you use pointers in java?

Java does not support Pointers and hence you cannot use it in Java.


Why Object is Super Most Class In Java?

It's part of the language specification that all objects in Java must inherit from Object. Java defines a strict class hierarchy, and enforcing a "super most class" ensures that this ordering is maintained.


What technologies link to Java?

Java is exclusive to surfing the web. Some web sites use Java to embed videos, others use Java for advertisements.


What you use in case of pointer in java?

Java does not have pointers


Does Java Script use the same compiler as Java?

No


What is java 7?

Java 7 is the most current version of Java. Many movies and games use Java.


Which is the best Book to understand JAVA in short?

You can use Head First Java or Java Complete Reference to learn Java.


Do you have to use java?

Not usually. There are numerous languages out there with similar functionality. The only time you must use Java is if your employer or client demands that a project be done in Java, or a particular platform requires the use of Java, such as Android OS.


What is the program to use the super and final keyword in java?

Many programs use those keywords.super refers to the direct superclass of the class referencing itfinal declares a variable or class unchangable


What happens when no constructor function is declared in a class - in Java?

When any constructor is deffined in your class, the java compiler create a default no argument constructor for you. This constructor only have an invocation to the super class constructor (" super( ) ").


How do you script a RuneScape bot?

RuneScape bots use Java. Use a Java Binary Code.


Why you not use clrscr in java?

Many reasons, one of them: there is no 'clrscr' in Java.