package lalala;
import java.io.*;
public class XXX {
public static void main(String[] args) {
FileOutputStream fos;
DataOutputStream dos;
try {
File file= new File("coba.txt");
fos = new FileOutputStream(file);
dos=new DataOutputStream(fos);
dos.writeBytes("Hello Java");
} catch (IOException e) {
e.printStackTrace();
}
}
}
coba.txt nya di dalam project kalian
ex :
C:\Documents and Settings\User\My Documents\NetBeansProjects\Streaming
^^
No comments:
Post a Comment