What is the difference between this() and super()?

Answer Posted / gcttcs

Super should be used only in the sub classes and super() is
used to point methods of super class. where as this can be
used in both super & sub classes and this() used to point
methods in the class where it is called.

Is This Answer Correct ?    28 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the drawbacks for singleton class?

514


What is java util?

530


Explain the advantages of packages in java?

513


What is reverse function?

566


Is set sorted in java?

510






Is java good for beginners?

576


What is the difference between jfc & wfc?

587


What does function identity () do?

513


Can we force garbage collector to run ?

566


How do you know if a value is nan?

559


Is math an abstract class in java?

529


How many types of operators are there?

514


What are the parts of a method?

531


Can we have static methods in an interface?

549


How do you sing an Applet ?

2026