Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help with integer class

807598Oct 4 2006 — edited Oct 4 2006
can anyone point out what i did wrong?
//*********************************
//IntWrapper.java
//
//*********************************
import java.util.Scanner;
	public class IntWrapper
{
	
	public static void main (String[] args)
{
	int x = new Integer();
	Scanner scan = new Scanner(System.in);
	System.out.print("Enter an integer");
	x = scan.nextInt();
	

	System.out.print("The binary number is: " + Integer.toBinaryString(x));
	System.out.print("The octal number is: " + Integer.toOctalString(x));
	System.out.print("The hexadecimal number is: " + Integer.toHexString(x));

	System.out.print("The minimum number is: " + Integer.MIN_VALUE(x));
	System.out.print("The maximum number is: " + Integer.MAX_VALUE(x));

		}
}
and am getting these errors
IntWrapper.java:11: cannot find symbol
symbol  : constructor Integer()
location: class java.lang.Integer
	int x = new Integer();
                ^
IntWrapper.java:21: cannot find symbol
symbol  : method MIN_VALUE(int)
location: class java.lang.Integer
	System.out.print("The minimum number is: " + Integer.MIN_VALUE(x));
                                                            ^
IntWrapper.java:22: cannot find symbol
symbol  : method MAX_VALUE(int)
location: class java.lang.Integer
	System.out.print("The maximum number is: " + Integer.MAX_VALUE(x));
                                                            ^
3 errors
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2006
Added on Oct 4 2006
1 comment
454 views