I just discovered that you can explicitly use the ...
# getting-started
f
I just discovered that you can explicitly use the word "constructor" when defining a class; and that is mandatory only when specifying a visibility modifier for the constructor, or when using an annotation. Hence, I am curious about what annotation one could use for a constructor and why. Many thanks.
s
If you use dependency injection framework like Dagger you can use
@Inject
annotation for constructor to mark that this constructor is injectable.
✔️ 2