public class Test{
public void Test(String name){};
public static void main()
{
Test t=new Test("right");
}
}
There is error in the above code when compile, could anyone tell me how to use the construct function with arg in Java?
There’s no constructor with parameters: