Difference between this(), super()?
Answer Posted / venki
this can be pointing to current object.
super can be used for accesing super class metods &varibles.
'this &super' are use full for constructers also .
thes two statements defining first satatement of
constructer.'this' is used for accesing current class
constuter.where as super is accessing super class
constructer.
| Is This Answer Correct ? | 56 Yes | 5 No |
Post New Answer View All Answers
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?
What is a nested class?
What does bitwise or mean?
Is arraylist ordered in java?
What is a concrete classes? Is Java object class is concrete class?
What are the advantages of java over cpp?
Similarity and difference between static block and static method ?
What is bubble sorting in java?
What is the default size of arraylist in java?
How to create a thread in java?
What is meant by data hiding/encapsulation?
What is the difference between the direct buffer and non-direct buffer in java?
Explain features of interfaces in java?
What are actual parameters?
Why set is used in java?