/***** 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);
}
}
}