Minggu, 27 November 2016

what is the use of super keyword in java

In this article we will look at super keyword. The super keyword is useful only in the context of inheritance. Let’s see what are the uses of this superkeyword in Java.   Uses of super keyword Following are the uses of super keyword: To refer the immediate super class constructor To refer the immediate super class members   Refer super class constructor: The super keyword can be used to invoke the constructor of its immediate super class and pass data to it. Syntax for doing so is given below: super(parameters-list); When writing the above statement inside the constructor of the derived class, it must be

The post what is the use of super keyword in java appeared first on Coding Security.


what is the use of super keyword in java
read more

Tidak ada komentar:

Posting Komentar