Win a copy of Rust Web Development this week in the Other Languages forum!

Vaishali Sutaria

Greenhorn
+ Follow
since Jun 16, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vaishali Sutaria

Hi All,

Thanks for your wishes.

ya, I think appearing for the latest SCJP 6 is a good idea, Writing lots of tiny programs will help.

I will now prepare for SCWCD.

All the best to u.

Thanks.
Vaishali.
12 years ago
Hi All,
I am Vaishali here.
I passed SCJP 6 exam on 27 August,2009 with 85%.
I am really very happy.
Thanks a lot to JavaRanch Community.
Thanks,
Vaishali.
12 years ago
Hi,
I am Vaishali.
I am following this example.
My doubt is when we say only a1's object is eligible for GC, do we mean Alpha object is gced or a1.b2 is gced?
If we say a1 object as whole is Gced then why the count[Total no of objects eligible for GC] is not 2 as one is Alpha object that has one Beta object as its Instance.
I see two examples from K&B book Q1 and Q10 Chapter 3.
Q1. Here one Cardboard object is eligible for GC which has Short Wrapper Object so count=2.
Q10. Here one Dozen object is eligible for GC which has an array so count=2.

Someone please help. I am badly stuck here.
Sorry if I still need to understand some concepts right.
Thanks a lot.
Hi There,
Thanks for that.
Actually, I was also referring the following Link on other example of GC. Here 2 objects(Cardboard object and its Short Wrapper Instance) are considered for GC.
Though Short Object is Instance of Cardboard object, We say two objects are eligible for GC.

https://coderanch.com/t/449628/Programmer-Certification-SCJP/certification/garbage-collection#2001151

And in the example discussed here, it is not like that.
Regards,
Vaishali.
Hi,
I am Vaishali here.
I see that object referred by a1 is eligible for GC. But it has b1(static) and b2.
So, here when we say only 1 object is eligible for GC, is it like a1.b2 is for gced?
My doubt is if a1 is gced , why not b2(beta object it has as Instance) as well?
Excuse me if I am mistaken for some facts which I still need to know.
Thanks.
Hi There,
I am Vaishali. New to this place.
I am stuck at Question 3 (Self Test) from Chapter 10 Kathy Sierra SCJP 6 Book.
Why option B is incorrect there?
Can someone please help?
Thanks.