Constructor in java

class Test
{
Test()
{
System.out.println("Hello friends...CodersArt");
}
Test(String a)
{
System.out.println(a);
}

}
class ConstDemo
{
public static void main(String[] args)
{
Test t = new Test();
Test tt = new Test("Hello world, we are CodersArt..!!");
}
}


Comments