Home arrow static arrow Java Programming [Archive] - is integer a type of Object.class
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - is integer a type of Object.class
This topic has 2 replies on 1 page.

Posts:52
Registered: 7/6/04
is integer a type of Object.class  
Jul 15, 2004 4:00 PM



 
hi, i need to verfiy the type of input data, if i try to see if type of input object isAssignableFrom(Object.class), it would fail, but is that every type is subtype of Object.class, i can input integer by saying: new Integer(2002) but that wont work to.
 

Posts:12,831
Registered: 2/22/00
Re: is integer a type of Object.class  
Jul 15, 2004 5:00 PM (reply 1 of 2)



 

Integer is a subclass of Object
The primitive type int is not a subclass of Object. int is not an object type at all.

Does that answer your question? If not, what is your question?
 

Posts:6,487
Registered: 5/5/04
Re: is integer a type of Object.class  
Jul 16, 2004 3:14 AM (reply 2 of 2)



 
int is not of type Object
Integer is of type java.lang.Object.
Integer is not of type org.omg.COBRA.Object

What is the exact error message?
 
This topic has 2 replies on 1 page.