This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
-the main difference is that a method is doing some business logic e.g. and a constructor is there to create a object on the heap memory. In the constructor you can set attributes of your object. - A constructor has no return type. - When a constructor is called and you do not call explicitly a super constructor then java will call the super constructor of the super class. (depending on what you extend your class, default is java.lang.Object) - a constructor cannot be inherited This are the main things i think Olli
third point is tricky...U are actually inheriting the constructors No. Only members of one class can be inherited by a descendant class. Constructors are not members and they are not inherited. From The JLS:
Constructor declarations are not members. They are never inherited and therefore are not subject to hiding or overriding.
[ June 23, 2003: Message edited by: Dirk Schreckmann ]