File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Generics ..Help need ASAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Generics ..Help need ASAP" Watch "Generics ..Help need ASAP" New topic
Author

Generics ..Help need ASAP

sunimal senaratne
Greenhorn

Joined: Mar 30, 2006
Posts: 4
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


sunimal
Edwin Dalorzo
Ranch Hand

Joined: Dec 31, 2004
Posts: 961
What about some code?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generics ..Help need ASAP