The method below is the method I am using to populate my array. However I wish to return a random deals_informationobject from my ArrayList of type Deals_Information but am not quite sure how.
    public void populateArray() {
    databaseReference.child("FruitDeals").addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(DataSnapshot dataSnapshot) {
            Iterable<DataSnapshot> children = dataSnapshot.getChildren();
            final ArrayList<Deals_Information> myArray = new ArrayList<>();
            for (DataSnapshot child : children) {
                Deals_Information deals_information = child.getValue(Deals_Information.class);
                myArray.add(deals_information);
            }
        }
        @Override
        public void onCancelled(DatabaseError databaseError) {
        }
    });
}
 
     
    