I assume you want to serialize your objects.
FileOutputStream fos = new FileOutputStream("objects.ext");
ObjectOutputStream oos = new ObjectOutputSream(fos);
oos.writeObject(myObject);
oos.close();
You may have to implement Serializable if you want to write your own classes. If the classes of the java library doesnt implement Serializable just make a new class, extended of that class and implement it then without any other changes.
You just have to add
implement Serializable
after your
public class MyClass (extends .... whatever)
The Serializable interface doesnt have any methods you had to implement.