File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Some Facts about Generics Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Some Facts about Generics" Watch "Some Facts about Generics" New topic

Some Facts about Generics

Quin Matthew

Joined: Jun 13, 2006
Posts: 2
Which statements are true about generics in Java? Select the 2 correct answers.
(a) Static member classes and interfaces can have type parameters.
(b) Non-static member classes can have type parameters.
(c) Anonymous classes cannot have type parameters.
(d) Exception types can have type parameters.
(e) Exception types can be used as type parameter bounds.
(f) Enum type can have type parameters.
(g) Parameterized types ArrayList<String> and ArrayList<Long> have different types at compile time, but
share the same runtime type, i.e. ArrayList.
(h) Arrays of concrete parameterized types cannot be created, i.e. new ArrayList<String>[2].
(i) Arrays of unbounded wildcard parameterized types can be created, i.e. new ArrayList<?>[2].
(j) Arrays of raw types can be created, i.e. new ArrayList[2].

which two will you choose,and can someone kindly explain the reason of your choice.

many thanks!
[ August 17, 2006: Message edited by: Quin Matthew ]
I agree. Here's the link:
subject: Some Facts about Generics
It's not a secret anymore!