졸프진행중...
배열값을 텍스트파일 생성 후 저장시키는 작업이 필요했습니다.
그래서 saveFile 이라는 메소드를 만들어봤습니다.


public static void saveFile(String tmp[]) {
String s = System.getProperty("user.dir");
System.out.println(s);
StringBuffer FileName = new StringBuffer(s+"\\debug\\output.txt");   //저장위치 및 파일명
PrintWriter out;
try {
out = new PrintWriter(new FileWriter(FileName.toString(), false));
for(int i = 0; i < 20 ; i++){
out.println(tmp[i]);
}
out.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}


String s = System.getProperty("user.dir");

이 부분은 현재 저장된 디렉토리를 불러오는 것이에요.
경로가 바뀌더라도 상관없겠지요.ㅎㅎ


out = new PrintWriter(new FileWriter(FileName.toString(), false));

뒤에 전 false라고 썼는데.. 원래 파일의 내용을 모두 지우고 새로 시작해야되기 때문이었어요.
텍스트파일의 내용은 유지하고 그 뒤에 저장시키려면 true로 바꿔주시면됩니다.