Is there a way to change this behavior so that the contained object's equals is being used? It seems the extra construction of what could be a complex object just to be used as the comparator may be excessive. (I'm sure this is a no, but have been proven wrong before)
Rahul wrote:
Yo can try examlab (free) by devaka cooray to get the "feel" of the exam.
Christian Daniel Ortiz Cuellar wrote:i heard that integer and char also has some kind of pooling.
Lakshmi wrote:also on the first quesion instead of int [] array (int[] dz = {1,2,3,4,5,6,7,8,9,10,11,12};} ) if it has some other primitive variable (like just int or float..) then there could be 3 object created and one is eligible for garbage colleciton ..is that correct??
Christian wrote:int is implicit boxed to Integer. this Integer A[] = {1,2,3,,4,5}; is perfectly legal.. as JDK 6. ilegal before JDK 6.
Christian wrote:On line 6 how its going to create two objects? There is only one "new" which means only one obect is created...same thing on the next line. Appreciate your help on this.
Lakhmi wrote:I understand how c i seligible for gor GC, but not clear hoe d is eligible for GC... d is first assinged to one object and that object is assigned to new a()..then how d is eligible for GC???
Bert bates wrote:Be aware that you *might* still get questions on recently removed objectives.
Again, in theory this shouldn't happen, but the reality is that it does. I would surmise that encountering *legacy* questions would tend to happen more in more remote or less trafficked test centers... that's just my surmise.