자바 IO FileOutputStream
package api.io;
import java.io.FileOutputStream;
public class FileOutputStreamTest {
public static void main(String[] args) throws Exception{
// TODO Auto-generated method stub
String str = "자바 프로그램";
String str2 = "test";
FileOutputStream fos=new FileOutputStream("src/data/fow.txt");
//변호사로 생각해라 변호사도 법을 전부다 외우지는 못한다
//그때그떄 찾아서 쓴다
//우리 개발자도 엄연히 변호사다
//기계변호사
fos.write(str2.getBytes());
//바이트로 변환시켜야 좋다
//군대 터널 사람 퇴근시키기
fos.close();
}
}
댓글
댓글 쓰기