Hello Seetharaman you are right that an ? is unbounded type but i have seen many instances in the book and the exam like
FOR EG if i declare this:
List <?>l =new LinkedList<Integer>
then this List gets defined to takeINTEGERS......m i right ??.....
...
So in ma prev eg if i had declared
List <?> list = new LinkedList<Erode<Integer, String, Long>>();
the list should be of take an ERODE instance right ??....but even when i TRY to ADD and ERODE Instance to it it Gives me an Compiler Error like this
cannot find symbol
symbol :method add (Erode)
location: interface java util.List <capture of ?>
list.add(new Erode()); ^
Hello Seetharaman you are right that an ? is unbounded type but i have seen many instances in the book and the exam like
FOR EG if i declare this:
List <?>l =new LinkedList<Integer>
then this List gets defined to takeINTEGERS......m i right ??.....
...
So in ma prev eg if i had declared
List <?> list = new LinkedList<Erode<Integer, String, Long>>();
the list should be of take an ERODE instance right ??....but even when i TRY to ADD and ERODE Instance to it it Gives me an Compiler Error like this
cannot find symbol
symbol :method add (Erode)
location: interface java util.List <capture of ?>
list.add(new Erode()); ^
Please SOMEONE HELP ME
Hey Guys thank you actually i was Mixing 2 things ...!!!.......i GOT it when you declare <?> ...you simply cannot add any thing...