> Good morning,
>
[quoted text clipped - 7 lines]
>
> Julian Wissel
It represents the class of the *primitive*, i.e. not the class of the
wrapper class.
Wrapper Primitive
Integer.class int.class (== Integer.TYPE)
Character.class char.class (== Character.TYPE)
Float.class float.class (== Float.TYPE)
etc.
Used when obtaining a Method that has a primitive parameter. E.g. to get
the static method toString(int) of class Integer:
Integer.class.getDeclaredMethod("toString", new Object[]{Integer.TYPE});
or
Integer.class.getDeclaredMethod("toString", new Object[]{int.class});

Signature
Regards,
Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
Dale King - 26 May 2005 04:46 GMT
>> Good morning,
>>
[quoted text clipped - 25 lines]
>
> Integer.class.getDeclaredMethod("toString", new Object[]{int.class});
And if you are wondering why we have two ways of doing the same thing,
the class literal (i.e. int.class) did not exist in the original version
of Java and were added later.

Signature
Dale King