Constructor System.out.println("In the constructor");
System.out.println("In the constructor");
Constructor that throws if (value < 0) throw new IllegalArgumentException("Constructors: value < 0");
if (value < 0) throw new IllegalArgumentException("Constructors: value < 0");
Not a Constructor, because of void // EXPECT COMPILE ERROR some compilers System.out.println("In void Constructor()");
// EXPECT COMPILE ERROR some compilers System.out.println("In void Constructor()");
Constructors l = new Constructors(); l.method1(); l.Constructors(); new Constructors(-1); // expect Exception
for (int i=0; i<5; i++) System.out.println(i);