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 ? | 55 Yes | 5 No |
Post New Answer View All Answers
What is the parse method in java?
What are some examples of variable costs?
Why java is not 100% object-oriented?
What do heavy weight components mean in java programming?
Justify your answer that you can't define a method inside another method in java, if you can then how?
Can you tell me range of byte?
When can we say that threads are not lightweight process in java?
Why string is not a wrapper class?
Is assembly language a low level language?
what is the use of bean managed and container managed with example?
When a lot of changes are required in data, which one should be a preference to be used? String or stringbuffer?
In a container there are 5 components. I want to display all the component names, how will you do that?
What is thread life cycle?
What is a lightweight component?
What is singleton class in ruby?