FileDocCategorySizeDatePackage
ConsRecurs.javaAPI DocExample399Sat Nov 25 12:54:10 GMT 2000None

ConsRecurs

public class ConsRecurs extends Object
What happens when two constructors call each other? Can you get an infinite loop out of the process?

Fields Summary
Constructors Summary
public ConsRecurs(int i)

		this(i*1.0);
	
public ConsRecurs(double d)

		this((int)d);
	
Methods Summary
public static voidmain(java.lang.String[] a)

		System.out.println("About to construct...");
		new ConsRecurs(Math.PI);
		System.out.println("Hey, I'm still alive!");