How are this() and super() used with constructors?

Answer Posted / bhadresh

this() use to invoke only same class constructor.

super() use to invoke super class constructor.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

508


What are drawbacks of singleton class?

510


Explain the public class modifier?

490


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

579


How do you do descending order in java?

511






Can we execute java program without main method?

508


What is the difference between JVM and JRE?

606


What is a local class in java?

567


What is the difference between preparedstatement and statement in java?

539


What is difference between pointer and reference?

496


Difference between concurrent hashmap and hashtable and collections

550


What is the most important feature of java? What is an interface?

502


What is a treeset in java?

533


What is the use of generics? When was it added to the Java development Kit?

541


How to set the permissions to a file in java?

526