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

How many ways can you break a singleton class in java?

486


What is the difference between compiler and jvm?

551


What are advantages of using Java?s layout managers than windowing systems?

1857


What is an interface in java? Explain

576


What is the benefit of inner / nested classes ?

525






What data type is string java?

535


What is the purpose of lambda expressions?

584


Does java have extension methods?

527


What is java util?

539


What is assembly used for?

502


what is mutual exclusion? : Java thread

552


Name component subclasses that support painting in java programming?

634


Is it possible to override the main method?

532


In java, how many ways you can take input from the console?

516


How do I run java on windows?

530