i need to save the Treeset on the disk and then load it from disk and compare the load set with the original to see if they are equal? but i am getting NotSerializableException: Can anyone help me? Thanks

import java.util.*;
import java.io.*;
import Numbers;


public class TestSaveNumbers implements Serializable{

//class TestSaveNumbers{
public static void main(String args[]) {

Numbers nu = new Numbers();
Numbers nu1 = new Numbers();
TreeSet a=new TreeSet(new Comp());

TreeSet b=new TreeSet(new Comp());

TreeSet c=new TreeSet(new Comp());

int max_range=30;
int total=4;

Integer number1;
Integer number2;
Integer ia;
int sequence=1;
int quantity;

quantity=0;


do{


number1 = new Integer((int)(max_range*Math.random()+1));
number2 = new Integer((int)(max_range*Math.random()+1));



a.add(number1);

String astring= String.valueOf(number1);
int ve = Integer.parseInt(astring);

b.add(number2);


quantity++;
//}

}while(!(quantity==total));
Iterator i=a.iterator();
while(i.hasNext())
{
Object o=i.next();
//System.out.print(o+" ");
}

//nu.toString();
//System.out.println(nu);
String astring= String.valueOf(a);
//int ve = Integer.parseInt(astring);
//int mi= Integer.valueOf(ve);

String bstring= String.valueOf(b);
//System.out.println("The Elements Sorted"+set);
System.out.println("The Elements of First set:"+a);
System.out.println("The Elements of Second set:"+b);
//nu.addNumbers();
c.addAll(b);
c.addAll(a);
System.out.println("The Union of the two sets:"+c);
b.retainAll(a);
System.out.println ("The Intersection:"+b);





try {


String sourceFile="a:\\Numbers.txt";
FileOutputStream foStream = new FileOutputStream(sourceFile);
ObjectOutputStream ooStream = new ObjectOutputStream(foStream);
// foStream.write();

ooStream.writeObject(a);
ooStream.writeObject(b);

foStream.flush();
foStream.close();
} catch (Exception e) {
System.out.println("Error during output: "+e.toString());

}




try {

FileInputStream fiStream = new FileInputStream("a:\\Numbers.txt");
ObjectInputStream oiStream = new ObjectInputStream(fiStream);

// a = (TreeSet)oiStream.readObject();
nu= (Numbers) oiStream.readObject();
System.out.println("Mike:"+nu1);
// b= (Numbers) oiStream.readObject();
fiStream.close();
} catch (Exception e) {
System.out.println("Error during input: "+e.toString());
}


//System.out.println(nu);

}}
//////////////////////////////////
import java.io.*;

/**
* class Numbers: An array of 50 Strings that will contains subsets of numbers
*/

public class Numbers implements Serializable {
/**
* A constant: The maximum number of Random numbers
*/
static public int MAXSETS = 5;
// static public final int MAXSETS = 3;

/**
* The integer variable count will hold the number of states in the subset
*/
private int count = 0;

/**
* The array state will hold the States in the subset of states
*/
// int[] myArrayOfIntegers[];
private int number[] = new int[MAXSETS];
// private String number[] = new String[MAXSETS];
/**
* Constructor method: Reserve space for the 50 Integers
*/
public Numbers() {
// for(int i=0;i < MAXSETS;i++) {
// number[i] = new Integer();
// total = 0;
for (int index = 0; index < number.length; index++) {
MAXSETS = MAXSETS + number[index];
}

}


/**
* addNumbers: adds a number to the collection of Numbers
* a string with the new number is passed as a parameter
*/
// public void addNumbers(String newNumber) {
public void addNumbers(int newNumber) {
number[count] = newNumber;
count++;
// System.out.println( newNumber);
}
public static int ADD(int a) {
return a;
}

/* public int ADD(String a) {
Integer Ia = new Integer(a);
//Integer Ib = new Integer(b);
number[count] = a;
count++;

return ADD(Ia.intValue());
}

/**
* toString: Convert the object to a string
*/

public String toString() {
// int num;
String str=" ";// = count+ " ";
// String str = count+ " ";
for(int i=0;i < count;i++){
// num = Integer.parseInt(str);

// str = number[i];
str = str+" "+number[i];
// str = str+" "+number[i];
}

// System.out.println("aaaaaaa"+ str);

return str;

}}