Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!

ved dixit

+ Follow
since Feb 05, 2010
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ved dixit

hi Ankit,

I will do that.

I think, the Answer is 1. Only 'z' will be eligible for GC !!

x, y, & a links to same number, while only z is linking to null at the end.
So only z will be eligible for GC !!

Just draw a diagram, that way it will be very easy to understand !!

@ Andriy : Thank you very much for nice explanation. It's helping me a lot to solve such problems related to GC !!

But i got confused for the code mentioned below :

It belongs to the Exercise of chapt 3..qus 11.

I created the diagram, and i realized that
b1 and a1 eligible for GC !!
But, i am not sure because answer is 1.

Can you please give a diagram, for this problem !!

Thanks in Advance !!

aww,, my bad !!

Thanks for the direction Ankit !!
happy Dashera !!

Happy Diwali in Advance
10 years ago
Hi ,

Can anyone explain me how does the code below work ?

I don't understand how the ans is 1 ?

This qus is from exam-lab

Thanks !!
@Seetharaman : Thanks for the Response !!

You gave me the answer for the first query.
Can you give me some explanation if the same
thing can be apply with the polymorphism or not ?
Hi friends,

the question below was asked me in one of the interview.
And i just want to make sure if my understanding is correct or not.

Now here, if the Student class has 2 Threads of Same instance.

and call is made by them, say Thread1.getId() and Thread2.getSub()
Will it work ? Will both methods will get called ?

My understanding is, at a time one instance can have one lock.
But want to know how does it operate when we have 2 threads of same instance
for two different synchronized methods ?

Hope, i am clear with my question.
please let me know if you want further details on it.

Also, if any one can explain me in detail with sample,
how it works in polymorphism that would be awesome !!
My concepts of threads are weak, and i need some what more understanding in that !!

Thanks in Advance !!
Thankss...i got it !!
Hi Neha !!

Thanks for the reply.
So the Object a will be eligible for GC
on line 9 or at the end of the method on line 14 or
when the main method ends (Suppose i have called it from main())?

I am preparing for SCJP 1.6
I came across this question from the link someone has posted in the forum of java ranch.
The link is here:
I have a doubt for a question related to GC .

How many objects will be eligible for GC just after the method returns?

Ans : 1 .

Please explain the reason.

Hi guys,

Thanks for responding.
Well, i am in california, USA.
Do you have any idea how can i get cheap vouchers here ?

Also, as you said other countries have less price for the voucher,
can i buy from other place and can i give test based on them in USA ?
My question sounds weird to me even, but just to make it sure.

And i tried to contact prometric center near my city, they said
its cost is $300. Do we have any other option or we have to go through that channel only ?

Your responses are appreciable,

thanks again,
Hi all,

I know that from oracle web we can buy the voucher of scjp 1.6 worth $300.
But is there any way, we can get the voucher for cheap rate ?
I guess pro metric center also provides the voucher with same rate.

I want to appear for the exam in November 2010.

Any help would be appreciated.

Thanks in advance.

Hi Prasad,

Thanks for the quick response !!
I will follow your guidance.

10 years ago
Hey Sahil,
Congratulations !!

I am preparing for the SCJP 1.6
Please give some guidance.
How much importance dumps carry ?

Also, if you can provide latest dumps,
that would be great !!
my email : ved2210(at)gmail(dot)com

Thanks in advance,

10 years ago