For example,, the Wrapper class Integer can be used to parse values..
String t = "10";
int t_val= Integer.parseInt(t);
Which gets the numerical value from the String and passes it to the t_val;
Now, there are quite a few usefull wrapper-classes..
Most of them have a capital letter to distinguise them from their
Originally posted by Paul Sturrock:
Yes thank you Gianfranco Alongi, I am well aware of the concept of a wrapper class. What I am not familiar with is a class called "Wrapper" in any version of the JDK. So what I'd like from Thanjai ramakrishnan is some hint of which class he's talking about. Otherwise, his question is hard to answer.
it's not Wrapper ,its wrapper class
what is the purpose of TYPE field and why it is of type Class?
The purpose of the TYPE field is, as the documentation says, to be able to acquire a Class instance representing the primitive type of the wrapper class.
So, then a good question might be, "Why would someone want a Class instance representing some primitive some?"
To a large extent, the answer to that question ventures in to the realm of reflection. For an introduction to that subject, I'd suggest taking a look at The Reflection API Trail of Sun's Java Tutorial.