posted 13 years ago
Hi,
I have doubt in the below mentioned questions from mock exam
1)
"Is the following statement true or false? generic parameters help avoid the problem of run-time class cast exceptions"
Answer given as "true".
But the above statement is true in case of collections only.
can anyone explain , can't we assume like this?
2) "Assigning null to reference causes the object to become eligible for garbage collection"
But this is true if this is the only reference refering to it.
But not true in case of more than one reference referencing the object.
Am i correct?