Is this a correct way to declare variable ?
public Woman wife;
Variable is wrong
Resolved
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Ashwin
18 February 2019, 05:49
nah, if you want to save wife in the man object as "woman", you have to write this:-
man.wife = woman;
Hope this helped! :)
0
Fernando Gerbrich
17 February 2019, 15:47
Thats wrong, the text say you have to safe the new object in the variable "woman".
Try to instance the woman first an in the second line save it in the "man.wife" variable
+1