shabbir,
Are you having problems with the answers?
I suppose so unless you are just showing us your
Java skills ...
All given answers seem to be correct to me...
11: Garbage collection will be kicked off when there is danger of running out of memory. And it releases memory from objects that no longer have references to them.
14: Badly worded question and terrible answer definitions. But given that one of them must be correct then B would have to be it. To be completely correct we need B to be:
new Inner() { }
21: No problem. Any number literal that contains a decimal point in Java is considered a double. A double can only be assigned to a double without casting. Therefore, A and B are invalid because no casting was performed! C is valid because the literal octal value in Java is considered an integer and an integer can always be assigned to a double.
Regards,
Manfred.