FileDocCategorySizeDatePackage
Constructors.javaAPI DocExample709Sat Nov 25 12:55:40 GMT 2000None

Constructors

public class Constructors extends Object
Show Constructors conflicting

Fields Summary
Constructors Summary
public Constructors()
Constructor

		System.out.println("In the constructor");
	
public Constructors(int value)
Constructor that throws

		if (value < 0)
			throw new IllegalArgumentException("Constructors: value < 0");
	
Methods Summary
public voidConstructors()
Not a Constructor, because of void

	// EXPECT COMPILE ERROR some compilers
		System.out.println("In void Constructor()");
	
public static voidmain(java.lang.String[] a)

		Constructors l = new Constructors();
		l.method1();
		l.Constructors();
		new Constructors(-1);		// expect Exception
	
voidmethod1()

		for (int i=0; i<5; i++)
			System.out.println(i);