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


Please Help Members By Posting Answers For Below Questions

What are the advantages of compiled language?

552


What is the program development process?

542


Explain how can you debug the Java code?

568


What are the characteristics of Final,Finally and Finalize keywords.

674


What is the protected method modifier?

544






What is the difference between processes and threads?

511


Can I import same package/class twice?

470


How do you sort a string in alphabetical order in java?

501


What is fundamental datatype?

503


What environment variables do I need to set on my machine in order to be able to run java programs?

578


what is the major difference between linkedlist and arraylist in java?

525


What is the size of a string in java?

520


Is list thread safe in java?

469


What is a protected method?

572


What is static keyword in java?

527