____ constructor is a block of codes similar to the method. It is called when an instance of the class is created code example
Example: constructor in java
public class ConstructorDemo
{
int a;
ConstructorDemo()
{
a = 26;
}
public static void main(String[] args)
{
ConstructorDemo obj = new ConstructorDemo();
System.out.println(obj.a);
}
}