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 are the advantages of compiled language?
What is the program development process?
Explain how can you debug the Java code?
What are the characteristics of Final,Finally and Finalize keywords.
What is the protected method modifier?
What is the difference between processes and threads?
Can I import same package/class twice?
How do you sort a string in alphabetical order in java?
What is fundamental datatype?
What environment variables do I need to set on my machine in order to be able to run java programs?
what is the major difference between linkedlist and arraylist in java?
What is the size of a string in java?
Is list thread safe in java?
What is a protected method?
What is static keyword in java?