1- if you don't call the constructor - the default parent()
constructor is called (no parameters)
so if you need to set the parent()'s parameters you must use super or
the correct name of the parent's constructor - so if things change
down the line you have to make more code changes...

2- for clarity in programming isn't it easier to understand & follow
that 'size' (comming in) is going to the local variable of the same
name... (remember - they are 2 different varibles) so you can use a
different name for the local variable, but doesn't it make it clearer
that 'size' comming in is going to be the 'local size' once the object
is created... and then later when you look through the javadocs and
immediately see the method takes 'size' - so you don't have to go
looking for the getXXXXsize() method, you already know its getSize
()...

On Feb 24, 8:08 am, Pavel Aleksandrov <[email protected]> wrote:
> Sorry but I still can't understand...
> For what is purpose to use "super" and "this" if I can do same
> operation and without them.
> For example I can call constructor from parent class if I just create
> new object from this class.
> Or same and for "this". I can use "exobject.size" and
> "this.exobject.size" in same time.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to