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

Answer Posted / amol

this() is used to call another constructor of current class based on the argument list....
super() is used to call the constructor of another class or parent class based on the argument list....

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is string stored in java?

560


Given a singly linked list, find the middle of the list in a single traversal without using temporary variable.

612


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters?

585


What about main() method in java ?

567


What is the instance of an object?

553






what is the final keyword denotes in java?

584


What is double in java?

518


What is the indent key?

592


What is http client in java?

521


Explain the difference between static and dynamic binding in java?

545


What is the longest unicode character?

695


What is function declaration?

532


What’s meant by anonymous class?

600


What is the final field modifier?

548


What initialize variables?

504