Re: Rules for constructors

From: Tim Ward (tw2_at_ipaccess.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 13:07:23 -0000


"Alex Hunsley" <lard@tardis.ed.ac.molar.uk> wrote in message
news:105gugk1t7tdn08@corp.supernews.com...
>
> b) never call non-final methods from your constructor
> (or else they will be overridden causing chaos as I have experienced
> today)

Pity Swing doesn't fully these rules ...

--
Tim Ward
Brett Ward Limited - www.brettward.co.uk


Relevant Pages

  • Rules for constructors
    ... This is because the constructor of B calls super, and by ... the initialisation of the member variables in class B ... (or else they will be overridden causing chaos as I have experienced ... overridden methods should not access member variables that are ...
    (comp.lang.java.programmer)
  • Re: Rules for constructors
    ... > (or else they will be overridden causing chaos as I have experienced ... never call an overrideable method from a constructor ... Tony Morris ... IBM Australia - Tivoli Security Software ...
    (comp.lang.java.programmer)