//BoxNonGeneric.java
//A simple non-generic version of a Box class.
//Since the private instance variable of this class is
//of type Object, objects of any type can be stored in
//class instances of this BoxNonGeneric class type.

public class BoxNonGeneric
{
    private Object object;

    public BoxNonGeneric(Object object)
    {
        this.object = object;
    }

    public void setObject(Object object)
    {
        this.object = object;
    }

    public Object getObject()
    {
        return object;
    }

    //Show the type of object.
    public void showType()
    {
        System.out.println(
            "Type of object is " + object.getClass().getName()
        );
    }
}
