파일 읽기
import java.io.BufferedRedaer;
import java.io.FileReader;
public class Test {
import java.io.FileReader;
public class Test {
public static void main(String[] args) {
try {
BufferedReader read = new BufferedReader(new FileReader("파일경로"));
String str = "";
while((str = read.readLine()) != null) {
String str = "";
while((str = read.readLine()) != null) {
System.out.println(str);
}
}
}
파일경로는 절대경로를 사용해 주는 것이 좋다.
절대경로를 알아내는 방법은
http://treeple.tistory.com/21
'Technology > Programming' 카테고리의 다른 글
Javascript / Javascript document (0) | 2009.12.11 |
---|---|
JAVA / 외부 명령어(프로그램) 실행하기 (0) | 2009.12.03 |
Python / 날짜 계산하기 (0) | 2009.11.07 |
Javascript / 날짜 정규표현식 (0) | 2009.10.30 |
Python / Python 2.x에서 3.x로 업그레이드 되면서 변한것 들 (0) | 2009.10.30 |