My question isnot on linkedlist in specific. But the example is using it.
Why the following code gives class cast exception, despite of that
Class linkedlist extends abstractlist implements list
Code is
LinkedList<String> link = (LinkedList) Arrays. asList(any array of string);
All of them are in the same hierarchy!!
Why the following code gives class cast exception, despite of that
Class linkedlist extends abstractlist implements list
Code is
LinkedList<String> link = (LinkedList) Arrays. asList(any array of string);
All of them are in the same hierarchy!!