They will take the same memory. The only difference is when the object is created, during the construction of the class, or when the method is called, the latter being a case of delayed initialization. --Mark
The reason for delaying initialization is to allow the delaying the creation of memory intensive objects until the last minute. If this fellow is going to be HUGE then you might want to delay - and then null out that variable as soon as possible. Otherwise it is probably better to create the object at the place the variable is declared. If the initialization is too far removed from the variable declaration you run the risk that the reader will have forgotten the "type" of the variable by the time you get around to putting something in it. Saving programmer time is a big issue also.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Friends help you move. Good friends help you move bodies. This tiny ad will help: