sth about Inheritance

public  class Test extends Test2
{
 Test(String s) {
  System.out.println(s);
  }
public static void main(String[] args)
  {
   Test t=new Test("Test");
  }
}

 class Test2
{
 Test2(String s) {
  System.out.println(s);
  }
 }

The compiler will complain.  In other words, it can not be compiled.

not know that before.

你可能感兴趣的:(sth about Inheritance)