What is the difference between a method and a constructor?
Methods and constructors are quite similar in nature, you can think of a constructor as a special type of static method that implicitly returns an instance of the relevant class. Methods have an explicit return type in their signature that tells you what type of object or primitive the method will return, or void if none. A constructor has no explicit return type because it always returns an instance of the class. In most other ways constructors are like methods, they have the same visibility modifiers and may have zero, one or more arguments. One notable property of constructors is that the Java compiler will automatically insert a call to the no-argument superclass constructor unless you explicitly add a superclass constructor statement. This arrangement will create a compilation error if the superclass does not have a visible no-argument constructor, in which case you must make the superclass constructor visible or add call to an alternative superclass constructor.