/*
 * This File is one of the examples from Java Application Development
 * Do not reproduce this code for others or use it in a commercial setting without prior permission from the author.
 */

package serializationExample;

/**
 *
 * @author Matthew Gregory
 * @website www.matthewgregory-author.com.au
 *
 */
public class TestCan {
    public static void main(String[] args) {
        Can myCan = new Can();
        myCan.price= 5;
        myCan.name="Lemonade";
        myCan.volume=350;
//        System.out.println("Saving Can: "+myCan);
//        myCan.saveObject();
        //Must match
//        Can1 newCan = (Can1) myCan.loadObject();
//        System.out.println("Retrived Can: "+newCan);
        Can newCan = (Can) myCan.loadObject();
        System.out.println("Retrived Can: "+newCan);
    }
    
}
