• Post Reply Bookmark Topic Watch Topic
  • New Topic

Q on garbage collection

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
class A {
2. int x;
3. public static void main (String [] args) {
4. A a = new A ( );
5. A a1 = new A ( );
6. a1.x = 1;
7. a.x = 0;
8. A a2 = a;
9. a1 = a2;
10. }
11.}

How do u answer such questions correctly?


 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) You might want to post in the certification forums.

2) You didn't actually post the question.

3) Not that I really care, but you didn't put the code inside the code tags.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!