Dependency Injection in Android using Dagger2

Dependency Injection in Android

Dependency Injection needs a better understanding so let’s break the term Dependency Injection in two parts Dependency and Injection. What is Dependency? Consider the following Java class. public class User { private Database mDatabase; public User() { mDatabase = new Database(); } } In the above class, we are creating the object of class Database…
Read more