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
Can we have static methods in an interface?
What is primitive array?
Why there is no call by reference in java?
How to do encapsulation in java?
What are the steps involved to create a bean?
What are the changes in java.io in java 8 ?
What is lazy initialization in java?
How are observer and observable used in java programming?
What are the steps in the jdbc connection?
Why collection is called framework in java?
What is difference between static and abstract class?
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
Which method must be implemented by all threads?
How do you use compareto in java?
Is zero a natural number?