strange error ... Xlint
While playing around with HashSet and some words I'm learning in Chinese I got a strange error, or warning ...
Note: SortStuff.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Do i need to use a try/catch block or somthing? Does anyone know what causes this?
Here is the code....
import java.util.HashSet;
import java.util.Iterator;
publicclass SortStuff{
static String[] lesson1Words ={"me","you","he","we","yous","they","which","country","person","people","America",
"Germany","German","China","Chinese","respected","surnamed","named","this","be",
"no","not","correct","company","Mr","good","goodbye"};
publicstaticvoid main(String args[]){
System.out.println("Start of Program....");
HashSet lesson1Set =new HashSet();
addToHashSet(lesson1Words,lesson1Set);
}
publicstaticvoid addToHashSet(String[] lessonWords, HashSet lessonSet){
for (int i=0;i<lessonWords.length;i++){
lessonSet.add(lessonWords[i]);
}
}
}
D:)>

