wrapper « primitive « Java Data Type Q&A





1. Wrapping primitives using the new operator vs wrapping primitives using valueOf    stackoverflow.com

What's the difference between,

Integer i = new Integer("42");
and
Integer i = Integer.valueOf("42");
Thanks.

2. resolver wrapper for primitive    coderanch.com

Hi! Yes i wrote method to resolve correct wrapper. I am making new web MVC architecture, where model object's functionality is defined by java 1.5's metadata functionality, and i used cglib to do some modification for these classes at runtime, but i had some problems with cglib/metadata directives, so i started to write new dynamic code generation library (top over asm), ...

3. Primitive vs Wrapper    coderanch.com

I'm not sure about what you're trying to ask. double's class is double, and Double's class is Double. But the TYPE member/variable of the class Double is of type double (the primitive one). Another way to think about it is this: TYPE is just a static member, meaning it's a variable belonging to the class Double. It could be called BILLYBOB ...

4. wrapper vs primitive    forums.oracle.com

5. any quick way of finding the wrapper type for arbitrary primitives?    forums.oracle.com

Last time I had to do this I was using 1.4. I couldn't find an easier way of doing it other than using a map. AFAIK nothing has come along in java 5 which makes this any easier - but then I dont know very much so don't take my word for it. ~D