Created
August 3, 2009 15:23
-
-
Save jkutner/160608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
public class FileOutput { | |
public static void main(String[] args) { | |
FileOutputStream fos; | |
DataOutputStream dos; | |
try { | |
File file= new File("C:\\MyFile.txt"); | |
fos = new FileOutputStream(file); | |
dos=new DataOutputStream(fos); | |
dos.writeInt(2333); | |
dos.writeChars("Hello"); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment