Hi
I was just going through the two design patterns namely factory method and dependencey injection and they both appear to be the same to me. In both the cases we take an external input based on which we decice as to what type of object is returned . Can someone explain me the difference between them and also with smiple java example.
Also I would request to explain the dependency injection out side the scope of spring. as i am not good at it
Thanks vey much!
Regards
Utsav.