Programming to an interface?
private collection<product> = new TreeSet<> - the private implementation uses a specific type (treeset).public collection getAllProducts() - the public interface uses a more general type (programming to the Collections interface) - exactly one line t
Comments
No comments have yet been made