devxlogo

June 20, 2003

Write to Multiple Targets Simultaneously

This is helpful, for instance, if you’re error logging to the file and body of an e-mail. Create a new subclass of OutputStream called TeeOutputStream like this: package be.marble.io;import java.io.*;public

Negative Numbers Represented in C++

You probably know that integers are represented in binary–in base 2. This is pretty straightforward for positive numbers, but it means you must choose an encoding for representing negatives. The