Take, for example, you have class A and class B. Class A uses a composition type relation that interacts with many objects of class B. Class A has saved references to objects of class B in Arralist
Class A { ArrayList<B> beeObjects; }
Is it really bad practice to return the data structure of an array list if you want to implement functionality that interacts with objects in an arraylist?
source share