Difference between this(), super()?

Answer Posted / janet

this() can be used to invoke a constructor of the same
class where as super() can be used to invoke a super class
constructor.

Is This Answer Correct ?    53 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

562


What are default methods ?

568


What are java packages?

575


Can we call virtual funciton in a constructor ?

1764


How many types of flags are there?

514






Are arrays classes in java?

523


Is java type safe?

499


What is java jit compilers?

552


What is the main functionality of the remote reference layer?

1406


What’s the difference between applets and standalone program?

522


How long will it take to learn java?

496


Can we rethrow the same exception from catch handler?

554


What are byte codes?

648


What happens if a constructor is declared private?

519


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

529