First page Back Continue Last page Overview Graphics
Saving a WordCounter Object
public static void main(String[] args){
WordCounter wCount= new WordCounter(“yes”,10”);
try{
- ObjectOutputStream objOut=
- new ObjectOutputStream(
- new BufferedOutputStream(
- new FileOutputStream(args[0])));
objOut.writeObject(wCount);
objOut.flush();
objOut.close();
}catch(IOException ioe){ }
}