When a constructor is called, it sets the state of the objects by assigning the values to the instance variables.
State refers to the attributes of an object that are represented by its instance variables.

A parameterized constructor is a constructor that has a specific number of arguments to be passed to assign values to an object’s instance variable.
Parameterized Constructor
public Painter(int x, int y, String dir, int paint)
Defining two or more constructors with the same name but with different constructor signatures is called overloading.

Components of a Parameterized Constructor
public Painter (int x, int y, String dir, int paint)
”int x”, “int y”, “String dir”, and “int paint” are the type and name of the values expected when calling the constructor.
A formal parameter is the value to be passed to a constructor or method.
public Painter (int x, int y, String dir, int paint) {
xLocation = x;
yLocation = y;
direction = new Direction(dir);
remainingPaint = paint;
}
”xLocation = x;”, “yLocation = y;”, “direction = new Direction(dir);”, and “remainingPaint = paint;” are local variables, which are variables declared and accessible within a specific block of code.
Calling a Parameterized Constructor
Painter katie = new Painter (2, 3, "North", 4);
”2”, “3”, ""North"", and “4” are the specific values to assign to the instance variables.
An actual parameter is the value to assign to the formal parameter.

The values of the actual parameters are copied to the constructor’s formal parameters. This is known as call by value.