This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Certification
»
Programmer Certification (SCJP/OCPJP)
Author
Arrays of generics
Alina Petra
Greenhorn
Joined: Oct 17, 2006
Posts: 26
posted
Nov 01, 2006 03:25:00
0
Which of the following lines can be compiled?
a)Basket<Apple>[] b = new Basket<Apple>[10];
b)Basket<?>[] b = new Basket<Apple>[10];
c)Basket<?>[] b = new Basket<?>[10];
d)public <T> T[]
test
() {return null;}
e)public <T> T[] test() {return new T[10];}
Can anyone give the right answer followed by explanation?
I agree. Here's the link:
http://aspose.com/file-tools
subject: Arrays of generics
Similar Threads
Arrays of generics
Generics Question
javabeat mock test
method types in Generics
generics question from javabeat
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter