Search:

Type: Posts; User: Junky

Search: Search took 0.16 seconds.

  1. Replies
    3
    Views
    1,558

    Re: Constructors and Inheritance in Java

    One more thing to note, due to this many people make the following mistake and wonder why their code will not compile.

    public class Cookie {
    public Cookie(String s) {
    ...
  2. Replies
    3
    Views
    1,558

    Re: Constructors and Inheritance in Java

    You are correct that constructors are not inherited. However, each constructor calls the super constructor all the way upto Object class (which doesn't call super as it is the top level class). If...
Results 1 to 2 of 2