Devin Moore

Jan 2007

Primitive Wrapping and Unwrapping

by in CodeSOD on

Daniel Rivera writes with a short but effective snippet. The company he works for purchased a JAVA "Application" developed offshore. The decision to purchase this software was made based solely on a PowerPoint demo given to the CEO.

Now in this particular JAVA example, a method called someMethod ( Integer someInt ) needs to be called with a given hard-coded primitive value like 0. One way of calling someMethod might look like this: