Code: Select all
Which lines contain a valid constructor in the following code?
public class TestClass{
   public TestClass(int a, int b) { } // 1
   public void TestClass(int a) { }   // 2
   public TestClass(String s); // 3
   private TestClass(String s, int a) { }     //4
   public TestClass(String s1, String s2) { }; //5
}Line 1 and 4 are clear. 2 is a method, 3 has no body.
Wouldnt line 5 be wrong?
Have never seen this before...
Maybe the idea is that we see a constructor and an empty statement, is that the case?