Write txt file java
Questions/Tutorials for any programming language not covered in other sections.
1 post
Page 1 of 1
this snippet is java , what this actually do is , this will create a txt file called Output.txt and write inside heho this from codenstuff ok here is the code
enjoy
Code: Select all
proof :P import java.io.*;
public class Output {
public static void main(String args[]){
FileOutputStream output;
PrintStream print;
try
{
output = new FileOutputStream("Output.txt");
print = new PrintStream( output );
print.println ("heho this is from codenstuff");
print.close();
}
catch (Exception e)
{
System.err.println ("cant write Output.txt");
}
}
}
enjoy
Find my programs on Softpedia
1 post
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023