First off, I have done some reading and I am wondering what is the purpose of having a Interface and the implementation class for example the Data Access Objects (DAO)? I have read that it increases flexibility, but I was wondering if someone could provide a concrete example as to why we need an interface.
If we are autowiring, do we still need to use a Interface and Implementation that implement the interface? If so, why? Do we just need the impl?
Thank you in advance.