In this program, you will see how to write content in a file in the ISO Latin-1 character set. This program takes a file name, if the given file exists then writes text into the file otherwise shows the message : "File does not exists.".
out.write( )
This is the method is used to write text in the
specified file in the ISO Latin-1 character set. Here, the specified string is
"Welcome to RoseIndia.Net"
which has to be written into the file.
Here is the code of the program :
import java.io.*;
|
Output of the Program:
| C:\nisha>javac WriteEncodedLatin.java C:\nisha>java WriteEncodedLatin Enter File name : Filterfile.txt Written Process Completed C:\nisha> |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Writing ISO Latin-1 Encoded Data in Java
Post your Comment