Hii , m quite new to the Java world and m looking for some very general examples,actually explaination for "This" and "Super" key words!!!i hav a book but it looks very BOOKISH
If you're really new to programming in general, not just Java, this may be a topic you'll want to cover later. this refers to the object that the method using that keyword is a part of, and in a way, so does super. However this uses the regular class basically, whereas super uses the base class.
this - a final reference to the current object. Can be used in any non-static context for example inside the body of an instance method.
there is also the this() construct. This is useful for overloading constructors. this() must be the first statement in a constructor and will invoke the local constructor with a corresponding parameter list.
super() is used in a subclass to invoke the superclass constructor with a corresponding parameter list. super() must also be the first statement in a constructor.
So in short this() is used for chaining local constructors when super() chains subclass constructors to superclass constructors.