Java-source: Ecrire des booléen dans un fichier

Author:

Java-source: Ecrire des booléen dans un fichier
{filelink=304}

/***** Code de MesExemples.com *******/
import java.io.DataOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;

class WriteBooleanToFile {

public static void main(String[] args) {

String strFilePath = "C://test.txt";

try
{

FileOutputStream fout = new FileOutputStream(strFilePath);
DataOutputStream dos = new DataOutputStream(fout);

boolean b = false;

dos.writeBoolean(b);

dos.close();

}
catch (IOException e)
{
System.out.println("IOException : " + e);
}

}
}

Leave a Reply

Your email address will not be published. Required fields are marked *