Can a constructor be static or final or synchronized?

What is a constructor, and what is its purpose?
A Constructor is special method and must have same name as Class.
A Constructor is invoked to initialize an object.
A Constructor does not syntactically return any value. But implicitly returns an instance of the object it initializes.

If Class does not have any constructor, Compiler generates an Implicit constructor.
Constructor(s) which is explicitly added by developer are called Explicit constructors.

Constructor with no arguments is called Default Constructor.
Constructors with parameters is called Parameterized Constructors.

Having multiple constructors with different number or different types of parameters is called Constructor Overloading

Access Specifier which can be used with Constructor

Constructor can be declared as private, public, protected or default or none

static or final or synchronized keywords can never be used with a Constructor

How to invoke a constructor, from another constructor of same class?
A Constructor of a class can be invoked from another Constructor of same class, by using this(); statement

How to explicitly invoke a Base class constructor, from Derived class constructor?
In Inheritance, it is possible to invoke constructor of immediate Base class from a Derived class constructor, by using super(); statement

What is Copy Constructor?
A Copy constructor creates an object with same state as the object which is sent as parameter to Copy Constructor. Type of parameter accepted by Copy Constructor is same as that class Type.

Below is an example of Copy constructor.

class Rect{

    private double width, height;

    // A normal parametrized constructor
    public Rect(double width, double height) {
        this.width = width;
        this.height = height;

    // copy constructor
    Rect(Rectc) {
        System.out.println("Copy constructor called");
        width  = c.width ;
        height = c.height;

public class CopyConstructorDemo {

    public static void main(String[] args) {
    Rect c1 = new Rect(10, 15);

    // Following involves a copy constructor call
    Rect c2 = new Rect(c1);

    System.out.println(c2); // toString() is called here

Is constructor invoked when an object is cloned?

Answer is yes and no. And that depends on implementation of clone( ) method in the class which implements Cloneable interface.

What is singleton?

Singleton ensures that only zero or at most one object of a class can exist.

Can both statements be used from a single constructor?


You may also like to read:
How to invoke constructor, using this
How to invoke base constructor
What is singleton?