Hi ranchers,
Exactly as Manfred explained.
I think the question is fooling you by thinking, it is about generics in the first place. And then you might simply to look at the assignments and whether a specific cast would be required.
But, Bharat,
you should tell us where this question # 181 is from!
Please supply the source of this mock. And, second, you would please us if you use code tags.
To indent your code properly:
At the posting page, mark the part of your posting that should be indented. Usually that will be your code (or some tabellaric output).
Hit the
- Button below.
that's it!
Trick:
You may also use the code tags for intended bad indentations, as you see then frequently in mock exams.
And it would be absolutely great, if you'd remove line numbers if you don't refer to it. Simply to make life of other ranchers a bit easier: Once and again, some rancher wants to copy/paste your test code in his or her system and look what's happening when this or that will be changed. And that would be easier without the line numbers.
As in your example:
I shifted the isolated line numbers 22 and 23 into a main method for clarity.
Yours,
Bu.