Test your Hilt knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.
Question 1/5Score 0
What does testability improvement typically look like when using Hilt-based dependency injection in an Android app, e.g. for unit testing a class that depends on a repository interface?
Questions in this quiz
What does testability improvement typically look like when using Hilt-based dependency injection in an Android app, e.g. for unit testing a class that depends on a repository interface?
What does the `@InstallIn` annotation on a Hilt module specify?
What is Hilt?
What kind of dependency typically requires a Hilt module with `@Provides` rather than simple constructor injection with `@Inject`?
What does `@AndroidEntryPoint` do when applied to an Activity, Fragment, or other Android component?
What is a common reason Google recommends Hilt as the standard DI solution for new Android projects, rather than using raw Dagger directly?
What are Hilt's predefined scopes, like `@Singleton`, `@ActivityRetainedScoped`, or `@ViewModelScoped`, used for?
What does Hilt's component hierarchy (Application → Activity → Fragment/ViewModel, etc.) reflect about how Android apps are structured?
Why is Hilt's compile-time code generation approach (as opposed to a runtime reflection-based DI approach) considered advantageous for Android specifically?
What is the purpose of the `@HiltAndroidApp` annotation in a Hilt-based Android application?
What is a realistic tradeoff a small, simple Android app with very few dependencies might weigh before adopting Hilt?
What is Hilt's support for testing (e.g. `@HiltAndroidTest` and test-specific modules) generally used for?