Play audio slide show -- Keyboard shortcut: 'x'  Back to slide -- Keyboard shortcut: 'u'              Play sound for this slide -- Keyboard shortcut: 'y'  NumberProducer.java - Et program som skriver et tal og en boolean på en binær fil.Lecture 11 - slide 35 : 35
Program 1

import java.io.*;

class NumberProducer{

 public static void main(String[] args) throws IOException {
  DataOutputStream dout = new DataOutputStream(
                            new FileOutputStream
                             (new File("numbers.dat")));

  int i = 5;
  boolean b = false;

  dout.writeInt(i);
  dout.writeBoolean(b);

  dout.close();
 }
}