trying to figure out how to get ReturnObject to hold any dkind of data type. Experimenting with using data type Object
adding method if arraylist becoming full so arraylist size is doubled
finished method isNearlyFull that doubles length of ArrayList when nearly full. Decided to initiate all values of ArrayList to null and use != null to check when list is nearly full, instead of using boolean variable containsSomething in ReturnObject