Difference between this(), super()?

Answer Posted / nikhlesh gupta

this() call one of user define constructor inside another user constructor of the same class such as this(a), this(a,b) & so on.
super() call one of base class constructor inside the derive class constructor such as super(a), super(a,b) & so on.

Is This Answer Correct ?    26 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we have static methods in an interface?

543


What is primitive array?

509


Why there is no call by reference in java?

490


How to do encapsulation in java?

563


What are the steps involved to create a bean?

676






What are the changes in java.io in java 8 ?

541


What is lazy initialization in java?

541


How are observer and observable used in java programming?

537


What are the steps in the jdbc connection?

564


Why collection is called framework in java?

530


What is difference between static and abstract class?

508


whar are the draw backs of programming lang step by step in Clang and next in C++ and next and in Java nad in .Net

1649


Which method must be implemented by all threads?

711


How do you use compareto in java?

545


Is zero a natural number?

556