Example() { dependency = new Dependency(); } } VS public class Example { private final Dependency dependency; public Example(Dependency dependency) { this.dependency = dependency; } }
Example() { dependency = new Dependency(); } } VS public class Example { private final Dependency dependency; public Example(Dependency dependency) { this.dependency = dependency; } }