| Author |
Simple Object Question
|
J. Ryan
Greenhorn
Joined: Jul 24, 2006
Posts: 21
|
|
I have a simple question about when memory is actually allocated. What is the difference between the following two code snippets? and Thanks. [ June 30, 2007: Message edited by: J Ryan ]
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24051
|
|
|
No difference at all, actually. Instance variable initializers like your "= new Object()" are compiled into the constructors of the class.
|
[Jess in Action][AskingGoodQuestions]
|
 |
J. Ryan
Greenhorn
Joined: Jul 24, 2006
Posts: 21
|
|
|
Thanks!
|
 |
 |
|
|
subject: Simple Object Question
|
|
|