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

Answer Posted / srinu

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

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is final keyword in java? Give an example.

572


Explain the importance of thread scheduler in java?

591


What is void class in java?

520


What is a cup of java?

551


What’s meant by anonymous class?

594






Is it possible to override private or static method in java?

534


What are the types of inner classes (non-static nested class) used in java?

556


What is bubble sorting in java?

589


What is protected in java?

517


How many static init can you have?

671


What are the states of thread in java?

506


What is the applet security manager, and what does it provide?

530


What is lastindexof in java?

538


What is the this keyword?

549


What is the synonym of procedure?

524