How are this and super used?

Answer Posted / sreekar reddy vanguru

Mainly this() is used to avoid hidding the field varaibles
by the varaibles of the methods which are having same name..

super() is used to invoke the super class from sub class...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we create objects if we make the constructor private ?

545


What is a key in java?

503


For class CFoo { }; what default methods will the compiler generate for you>?

620


Is there any case when finally will not be executed?

527


What do you mean by local class?

517






Can we override singleton class?

538


What is percentage in java?

575


Is java call by value?

586


How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?

604


What invokes a thread's run() method in java programming?

571


What is final class?

577


How can I debug the Java security exceptions and AccessControlExceptions?

638


What state does a thread enter when it terminates its processing in java programming?

578


Define immutable object?

581


Can I use % with real numbers?

564