0
아래 보이는 URL에서 읽으려고하는데 ArrayList에 저장하려고하면 오류가 발생합니다. 오류의 원인에 대한 아이디어가 있습니까?URL에서 읽기 및 Java ArrayList에 저장
public abstract class ItemList implements ItemListInterface{
private static String inputLine;
private static ArrayList<String> wordArray;
public static void main(String[] args) throws Exception {
URL wordList = new URL("http://dl.dropbox.com/u/18678304/2011/BSc2/phrases.txt");
BufferedReader in = new BufferedReader(
new InputStreamReader(
wordList.openStream()));
while ((inputLine = in.readLine()) != null){
System.out.println(inputLine);
wordArray.add(inputLine);
}
in.close();
}
}
오류를 보여주십시오. – trojanfoe
저장하는 동안 어떤 오류 메시지가 나타 납니까? –
첫 번째 단어 "aaa"를 인쇄합니다. –