| Author |
HF : method before name
|
patrick van merchtn
Greenhorn
Joined: Apr 04, 2007
Posts: 9
|
|
Hi, in my book Head First p. 62 You've got the creation of an object. a few lines futher in this class you've got the method My question is, it seems that he call first the method and later set a nanme. Is this ok in java, to add the name to the instance variable after you invoke the method where you need this name ?
|
 |
patrick van merchtn
Greenhorn
Joined: Apr 04, 2007
Posts: 9
|
|
sorry, I see it. Of course the first time when he invoke the method there is no name assigned to the variable and the result is : null hello.
|
 |
 |
|
|
subject: HF : method before name
|
|
|