Source code for IntegerExample.java:

public class IntegerExample
{
	public static void main(String args[])
	{
		// IntegerExample
		Integer I = new Integer(2112);
		int i = I.intValue();
		System.out.println(I);
		System.out.println(i);
	}
}

Output from IntegerExample.java:

2112 2112

--- Output Ends ---

NOTE:

You are reading previously generated output. You are not currently running the IntegerExample application at the momement. You need to compile and run the source code first.

To run this program:


Authors: Kevin Chu and Eric Brower
Copyright 2000 Prentice Hall PTR