A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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.
It is sorta covered in the
JavaRanch Style Guide
subject: meaning of "?" in list
S&B 1.5, Chapter 7, Question 2, answer C
List interface in Collection Framework
Error: Generics are not supported in -source 1.4
what is the use of ..
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-2013