What is the difference between this() and super()?
Answer Posted / prabu.b
1)Super() always calling the constructor of immediate
super class, super() must always be the first statements
executed inside a subclass constructor.
2)You cannot use this() and Super() in the same constructor.
| Is This Answer Correct ? | 23 Yes | 4 No |
Post New Answer View All Answers
What is the main functionality of the remote reference layer?
What is a line break example?
What do you mean by object?
Can you override a final method?
How do I start learning java?
What is stack class in java?
Why do people says “java is robust”?
How to calculate the length of a singly linked list in java?
what is abstract class in Java?
What are the features in java?
What environment variables are required to be set on a machine in order to run Java programs?
Is java util list serializable?
How many ways can an argument be passed to a subroutine and explain them?
Can a constructor have different name than a class name in java?
What is the difference between interface & abstract class?