|
|
Authorized user can see question and answers. Please log in or sign up. 
|
#102. Given: 1. public class Foo { 2. int size; 3. public static void main (String[] args ) { 4. Foo f = new Foo(); 5. f.setSize(5); 6. Foo g = f.go(f); 7. System. out. print(f. size + " : " + g. size); 8. } 9. void setSize(int s) { 10. size = s; 11. } 12. public Foo go(Foo g) { 13. g.setSize(2); 14. return g; 15. } 16. }
What is the result?
Show comments for this question (0)
Add comments
Link to this question
|
|
|
|
gen. 0.428
|
Server date 06:45 10-01-2009
|
Developed by Zip © 2006
|
|
 |
|
|