How are this and super used?

Answer Posted / ravikiran(aptech mumbai)

this keyword is used to refer the current instance of the
particular class where as super keyword is used to refer the
superclass members.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between static (class) method and instance method?

572


Can an integer be null java?

557


Do I need to import java.lang package any time? Why?

741


What are the important features of Java 8 release?

580


Explain how can you debug the Java code?

592






What are filterstreams?

615


What are the basics of core java?

550


What is the difference between size and length in java?

513


What is the difference between a loader and a compiler?

526


Can an object be null?

551


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1839


How many static init can you have?

684


What is data and its types?

573


What are the advantages of java over cpp?

553


What restrictions are placed on method overriding?

642