/*
Create FileOutputStream object from File object
This example shows how to skip createFileOutputStream object from File object.
*/
import java.io.*;
public class CreateFileOutputStreamObjectFromFile {
public static void main(String[] args) {
File file = new File("C://FileIO//demo.txt");
/*
* To create FileOutputStream object from File object use,
* FileOutputStream(File file) constructor.
*/
try
{
FileOutputStream fos = new FileOutputStream(file);
}
catch(FileNotFoundException ex)
{
System.out.println("Exception : " + ex);
}
}
}
Bookmark/Search this post with:
Faaark. This is so good.
Faaark. This is so good.
Post new comment