• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generics ..Help need ASAP

 
sunimal senaratne
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all

I m preparing for SCJP 310-055 exam . Java version I m using is java version "1.5.0_06" . I tried to compiled K&B books examples. For array list always I will have following error Please help me ASAP....

C:\jcertification>javac -Xlint:unchecked TestLegacy.java
TestLegacy.java:8: type ArrayList does not take parameters
List<Integer> myList = new ArrayList<Integer>();
^
TestLegacy.java:10: type ArrayList does not take parameters
ArrayList<Integer> l = new ArrayList<Integer>();
^
TestLegacy.java:10: type ArrayList does not take parameters
ArrayList<Integer> l = new ArrayList<Integer>();
^
C:\jcertification\ArrayList.java:13: warning: [unchecked] unchecked call to set(
int,E) as a member of the raw type java.util.List
sList.set(3,"six"); // change List
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about some code?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic