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 is a boolean used for?
What is the best way to findout the time/memory consuming process?
How static variable work in java?
How do you remove all elements from an arraylist in java?
How to change the priority of thread or how to set priority of thread?
Is class forname reflection?
Explain about fail safe iterators in java?
What is a Null object?
Is namespace same as package in java?
What are mutable classes?
How do you square a number in java?
What are the steps involved to create a bean?
Is main a function?
Why are arrays useful in java?
Can a static class have a constructor?