You aren't going to do what you're trying. There are all kinds of discussions about Java and pass by value and pass by reference. The easy thing to remember is that you can modify an object by calling methods on it. You can never reassign an object that was passed into a method. For example -
The above will infact change the name to Sam. If instead you did this -
You won't get the name change, as you can't modify where myObj points to from within a method. Technically, java is always pass by value.
Here's some more insight -
http://www.javaranch.com/campfire/StoryPassBy.jsp HTH,
Aaron R>
PS - If you aren't going to do anything else in your init method, then
you should just do a new wherever you would have called that method.