Singleton vs Dependency Injection
<p>I never used by myself the java dependency injection feature, so I went reading some pages about it and I am still not clear about the duel between the singleton and dependency injection.</p>

<p>Let's take a basic example: Let's say I'm buidling a small Java application, using MVC or MVVM pattern. I would start with a login page, requesting a username and password.
Those 2 information may be needed later on in the application so I would need to store them in a simple POJO, accessible from any view of the application.</p>

<p>What should I use then? A singleton? Or should I @Inject the constructor of the POJO and get it when needed with the Injector (like done with Guice)?</p>

<p>Thanks for enlightening me :)</p>