A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
meaning of "?" in list
Joined: Oct 06, 2008
Oct 20, 2008 00:06:00
as we know
List <Integer> list= new
can contain only a list of Integers.
then what is the meaning and use of
List <?> list= new
what is the use of "?" symbol in this?
Joined: Dec 16, 2007
Oct 20, 2008 00:41:00
It means a list of <<Anything>>. It is called as a wild card. The super class to all Generic collections is not Collection<Object> but a Collection<?>.May be
could help you understand better.
I agree. Here's the link:
subject: meaning of "?" in list
Error: Generics are not supported in -source 1.4
S&B 1.5, Chapter 7, Question 2, answer C
what is the use of ..
List interface in Collection Framework
how to add an array to an ArrayList
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014