The answer to this question has been given below: Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message you forward, because the instance is of a known class, rather than a new class, and because it doesn�t force you to accept all the methods of the super class: you can provide only the methods that really make sense. On the other hand, it makes you write more code, and it is harder to re-use (because it is not a subclass).
The answer to this question has been given below: Delegation is an alternative to inheritance. Delegation means that you include an instance of another class as an instance variable, and forward messages to the instance. It is often safer than inheritance because it forces you to think about each message you forward, because the instance is of a known class, rather than a new class, and because it doesn�t force you to accept all the methods of the super class: you can provide only the methods that really make sense. On the other hand, it makes you write more code, and it is harder to re-use (because it is not a subclass).
hi dhwani, i felt the free mock tests exactly reflecting the real questions. For me,the first ten questions were from threads which made me quite nervous and hence I struggled hard to gain my confidence back and answer all other questions effectively. There were some 16 to 17 drag drop questions. Be very careful about them as you might have already known that once you try to review them, they already set answers are gone. I felt the generics part easy. But to my surprise i scored only 50% in fundamentals (though i had thought i am pretty strong in that ) anyways All is well that ends well... all the best... hope my experience can give you some good tips....
Thanks to all ranchers and special thanks to Kathy Sierra and Bert Bates... awesome book written by them.... [ July 26, 2007: Message edited by: debasmita pattnayak ]
hi all, please someone expain me the following code snippet:
According to me it should print "Girrafe". please clarify if i am correct or not? thanks in advance [ July 23, 2007: Message edited by: debasmita pattnayak ]
Hi Manfred, This was not clear for me. Why does the compiler behaves like this?? it is during the runtime in which the generic syntax has no role to play. I am bit confused... can you please elaborate on the same???
But the answer to this is compilation error Can someone explain me why? Is it because method 3 and method 5 are confusing the compiler as to which method to call??
hi all, i want to know that when we buy whizlab, we are provided with a license number. so can it be installed again and again on any system with that license number. i want to know this because i dont have a system at my home and doing my practise in a net palour. so it may happen sometimes that i will not get the same system everytime.. its very urgent as i am planning to buy it today. so kindly give your comments.... and it will be of great help if someone also tells me about the current price of whizlab kit...
Hi, i am also looking forward to buy the whizlab preparation kit.... but got confused with the current price they are charging. can anybody tell whats the actual price now??? thanks in advance