Skip to content

Commit fbfb09d

Browse files
Merge pull request amitshekhariitbhu#47 from nishantt12/patch-2
Update README.md
2 parents 7537f05 + 916039c commit fbfb09d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ It is also a good practice to annotate overridden methods with `@Override` to ma
597597
* What is Dependency Injection? Can you name few libraries? Have you used any?
598598
- Dependency injection is a very powerful technique, where you relay the task of providing object with its' dependencies on instances of other objects (OOP Composition, [Wikipedia](https://en.wikipedia.org/wiki/Object_composition?oldformat=true)) to a separate class. This allows for fewer constructors, setters, factories and builders as all those functions are taken care of by the DI framework that you use. Also, and it may seem as a minor advantage, but if you use DI framework you need not worry about going through the project and changing all of (example names) `YourCustomInterface customInterfaceObject = new YourCustomClass();` to a new implementaion, as long as your new class (in place of `YourCustomClass`) still implements `CustomInterface` - you can just tweak the DI factory class to produce new class and voila - this new class will be automatically instantiated throughout your code. This allows for better maintenence and control over the program. Another example of DI usage is unit-testing - it allows to conveniently inject all needed dependencies and keep the amount of written code at a lower level.
599599
- One of the most popular libraries for DI for Android is Dagger 2. [Mindorks](https://blog.mindorks.com/a-complete-guide-to-learn-dagger-2-b4c7a570d99c)
600-
* What does the keyword `synchronized` mean?
600+
* What does the keyword `synchronized` mean? [Link](https://stackoverflow.com/a/1085745/2621950)
601601
* What are `transient` and `volatile` modifiers? [Link](http://javaexplorer03.blogspot.in/2015/07/difference-between-volatile-and.html)
602602
* What is the `finalize()` method?
603603
* How does the `try{} catch {} finally{}` works?

0 commit comments

Comments
 (0)