how to create a constructior java 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);
}
}