Docsity

Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection,, Exams of Computer Science

Toggle sidebar
bg1
Dagger Dependency Injection Practice Exam
(Fundamentals, Components, Modules,
Injection, Build and Testing, Design,
Troubleshooting, Ethics) - 300 Original
Questions with Answers
Original Dagger practice
300 Multiple-Choice Practice Questions
with Answer Key and Explanations
2026 Edition
Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -
300 Original Questions with Answers | Page 1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, and more Exams Computer Science in PDF only on Docsity!

Dagger Dependency Injection Practice Exam

(Fundamentals, Components, Modules,

Injection, Build and Testing, Design,

Troubleshooting, Ethics) - 300 Original

Questions with Answers

Original Dagger practice

300 Multiple-Choice Practice Questions

with Answer Key and Explanations

2026 Edition Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

Exam Overview This original practice exam covers the Dagger dependency injection framework: fundamentals, components and scopes, modules and bindings, injection patterns, build and testing, design, troubleshooting, ethics, and applied scenarios. It is not affiliated with or endorsed by Google or Square, does not reproduce documentation, books or courses, and is not an official exam. Library versions change, so please confirm with current documentation. It is educational only and not legal advice. Exam Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) - 300 Original Questions with Answers Intended for Java and Android developers Number of questions 300 multiple-choice (four options, one best answer) Content areas 9 Suggested time 5 hours (about 60 seconds per question) Suggested passing target 80% or higher (240 of 300) Answer format The correct answer and explanation appear directly after each question

Content Blueprint

Content area Questions Share of exam Fundamentals 33 11% Components and Scopes 33 11% Modules and Bindings 33 11% Injection Patterns 33 11% Build and Testing 33 11% Design 33 11% Troubleshooting 33 11% Ethics 33 11% Applied Scenarios 36 12%

How to Use This Exam

 Cover the answer lines with a sheet of paper and attempt each question before checking.  Work one content area at a time, or take all questions in one timed sitting to simulate test day.  Mark every question you miss or guess on, then reread its explanation and the related reference material.  Repeat the missed questions after a few days; aim to explain why each wrong option is wrong.

Reference Materials Used

 Dynamics 365 Business Central functional practice (confirm against current official documentation) Note: This is an independent practice resource written to the published content areas for this exam. It is not affiliated with or endorsed by the testing organization, and it does not contain actual exam questions. Laws, codes, fees and guidelines change; confirm current requirements with the official candidate handbook and references. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

Section 1: Fundamentals

1. Dagger: A. Not allowed in the graph B. Common platform for Dagger C. Compile time dependency injection framework D. Distinguishes same typed bindings Correct answer: C. Compile time dependency injection framework Explanation: Fnd. 2. Dependency injection: A. Supplying objects from outside B. Errors found during the build C. Build step that generates code D. Wiring objects by hand Correct answer: A. Supplying objects from outside Explanation: Fnd. 3. Inversion of control: A. No runtime reflection needed B. Framework wires the objects C. New instance per request D. Errors found during the build Correct answer: B. Framework wires the objects Explanation: Fnd. 4. Dagger 2: A. Dagger reduces manual wiring code B. Injects through methods C. Framework wires the objects D. Current generation of Dagger Correct answer: D. Current generation of Dagger Explanation: Fnd. 5. Compile time: A. Errors found during the build B. Build step that generates code C. Built in string qualifier D. Distinguishes same typed bindings Correct answer: A. Errors found during the build Explanation: Fnd. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

6. Code generation: A. Errors found during the build B. Method that supplies an object C. No runtime reflection needed D. Dagger writes factory classes Correct answer: D. Dagger writes factory classes Explanation: Fnd. 7. Annotation processing: A. Runtime DI alternative B. Distinguishes same typed bindings C. Build step that generates code D. Current generation of Dagger Correct answer: C. Build step that generates code Explanation: Fnd. 8. Reflection free: A. Wiring objects by hand B. No runtime reflection needed C. Primary language for Dagger D. Class that provides dependencies Correct answer: B. No runtime reflection needed Explanation: Fnd. 9. Java: A. Current generation of Dagger B. Distinguishes same typed bindings C. Primary language for Dagger D. Errors found during the build Correct answer: C. Primary language for Dagger Explanation: Fnd. 10. Kotlin: A. Interface that builds the graph B. Framework wires the objects C. Wiring objects by hand D. Used with kapt or KSP Correct answer: D. Used with kapt or KSP Explanation: Fnd. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

16. Component: A. Errors found during the build B. Wiring objects by hand C. Current generation of Dagger D. Interface that builds the graph Correct answer: D. Interface that builds the graph Explanation: Fnd. 17. Module: A. Injects into non static fields B. Dagger reduces manual wiring code C. Wiring objects by hand D. Class that provides dependencies Correct answer: D. Class that provides dependencies Explanation: Fnd. 18. Provides: A. Distinguishes same typed bindings B. Method that supplies an object C. Not allowed in the graph D. Easier replacement of dependencies Correct answer: B. Method that supplies an object Explanation: Fnd. 19. Binds: A. Abstract method that maps an interface B. Dagger reduces manual wiring code C. Distinguishes same typed bindings D. Used with kapt or KSP Correct answer: A. Abstract method that maps an interface Explanation: Fnd. 20. Dependency graph: A. Interface that builds the graph B. Marks a dependency to supply C. Directed acyclic graph of objects D. Method that supplies an object Correct answer: C. Directed acyclic graph of objects Explanation: Fnd. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

21. Object graph: A. Current generation of Dagger B. Instances wired together C. Reflection based DI alternative D. Controls instance lifetime Correct answer: B. Instances wired together Explanation: Fnd. 22. Cyclic dependency: A. Not allowed in the graph B. Dagger reduces manual wiring code C. Easier replacement of dependencies D. Build error when nothing provides a type Correct answer: A. Not allowed in the graph Explanation: Fnd. 23. Missing binding: A. Dagger reduces manual wiring code B. Marks a dependency to supply C. Not allowed in the graph D. Build error when nothing provides a type Correct answer: D. Build error when nothing provides a type Explanation: Fnd. 24. Duplicate binding: A. Errors found during the build B. Primary language for Dagger C. Build error with two providers D. Android layer built on Dagger Correct answer: C. Build error with two providers Explanation: Fnd. 25. Scope: A. Controls instance lifetime B. Distinguishes same typed bindings C. Primary language for Dagger D. One instance per component Correct answer: A. Controls instance lifetime Explanation: Fnd. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

31. Provider: A. Lazily supplies new instances B. Errors found during the build C. Current generation of Dagger D. Not allowed in the graph Correct answer: A. Lazily supplies new instances Explanation: Fnd. 32. Lazy: A. Reflection based DI alternative B. Distinguishes same typed bindings C. Abstract method that maps an interface D. Creates once on first use Correct answer: D. Creates once on first use Explanation: Fnd. 33. Testability: A. One instance per component B. Build error with two providers C. Supplying objects from outside D. Easier replacement of dependencies Correct answer: D. Easier replacement of dependencies Explanation: Fnd. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

Section 2: Components and Scopes

34. Component annotation: A. Declares a component interface B. Injects fields into an object C. Expose only what is needed D. Component and binding scopes must match Correct answer: A. Declares a component interface Explanation: Cmp. 35. Component builder: A. Starts a component builder B. Component without a scope C. Creates a component with inputs D. Builds a component with no inputs Correct answer: C. Creates a component with inputs Explanation: Cmp. 36. Component factory: A. Lives with a fragment B. Creates a component with parameters C. Injects fields into an object D. Creates a subcomponent Correct answer: B. Creates a component with parameters Explanation: Cmp. 37. BindsInstance: A. Supplies a runtime value to the graph B. Exposes a binding from a component C. Uses another component as a source D. Lists modules for a component Correct answer: A. Supplies a runtime value to the graph Explanation: Cmp. 38. Component dependencies: A. Builds a component with no inputs B. Injects fields into an object C. Uses another component as a source D. Declares a component interface Correct answer: C. Uses another component as a source Explanation: Cmp. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

44. Provision method: A. Component without a scope B. Builds a component with no inputs C. Starts a component factory D. Exposes a binding from a component Correct answer: D. Exposes a binding from a component Explanation: Cmp. 45. Members injection method: A. Injects fields into an object B. Supplies a runtime value to the graph C. Expose only what is needed D. Starts a component builder Correct answer: A. Injects fields into an object Explanation: Cmp. 46. Inject members: A. Component and binding scopes must match B. Exposes a binding from a component C. Method taking the target as an argument D. Injects fields into an object Correct answer: C. Method taking the target as an argument Explanation: Cmp. 47. Component lifecycle: A. Creates a subcomponent B. Tied to a scope owner C. Minimal exposed bindings D. Starts a component builder Correct answer: B. Tied to a scope owner Explanation: Cmp. 48. Application component: A. Creates a component with inputs B. Exposes a binding from a component C. Supplies a runtime value to the graph D. Lives as long as the app Correct answer: D. Lives as long as the app Explanation: Cmp. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

49. Activity component: A. Provides bindings to children B. Lives with an activity C. Minimal exposed bindings D. Tied to a scope owner Correct answer: B. Lives with an activity Explanation: Cmp. 50. Fragment component: A. Lives with a fragment B. Lists modules for a component C. Example generated class name D. Uses another component as a source Correct answer: A. Lives with a fragment Explanation: Cmp. 51. Parent component: A. Factory style creation B. Declares a component interface C. Provides bindings to children D. Lives as long as the app Correct answer: C. Provides bindings to children Explanation: Cmp. 52. Child component: A. Prefer abstractions B. Combines modules C. Starts a component builder D. Sees parent bindings Correct answer: D. Sees parent bindings Explanation: Cmp. 53. Component hierarchy: A. Delete B. Hidden C. Nested graphs D. Print Correct answer: C. Nested graphs Explanation: Cmp. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

59. Unscoped component: A. Use test components B. Component and binding scopes must match C. Creates a subcomponent D. Component without a scope Correct answer: D. Component without a scope Explanation: Cmp. 60. Component creation: A. Lives with an activity B. Generated DaggerComponent class C. Combines modules D. Starts a component builder Correct answer: B. Generated DaggerComponent class Explanation: Cmp. 61. DaggerAppComponent: A. Component bound to one scope B. Swaps modules for tests C. Tied to a scope owner D. Example generated class name Correct answer: D. Example generated class name Explanation: Cmp. 62. Create method: A. Marks a custom scope B. Declares a component interface C. Builds a component with no inputs D. Exposes a binding from a component Correct answer: C. Builds a component with no inputs Explanation: Cmp. 63. Builder method: A. Components and scopes B. Starts a component builder C. Example generated class name D. Injects fields into an object Correct answer: B. Starts a component builder Explanation: Cmp. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

64. Factory method: A. Starts a component factory B. Creates a component with inputs C. Compile error for incompatible scopes D. Factory style creation Correct answer: A. Starts a component factory Explanation: Cmp. 65. Generated code: A. Component bound to one scope B. Builds a component with no inputs C. Located in build output D. Tied to a scope owner Correct answer: C. Located in build output Explanation: Cmp. 66. Component readability: A. Generated DaggerComponent class B. Keep components small C. Sees parent bindings D. Use test components Correct answer: B. Keep components small Explanation: Cmp. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

72. Binds annotation: A. Marks a module class B. Map of contributed values C. Explain what each module provides D. Maps an implementation to an interface Correct answer: D. Maps an implementation to an interface Explanation: Mod. 73. Binds benefit: A. Provider may return null with annotation B. Avoids creating extra code C. Declares an optional binding D. Adds an entry to a map Correct answer: B. Avoids creating extra code Explanation: Mod. 74. BindsOptionalOf: A. Static style provider B. Map key using a class C. Declares an optional binding D. Marks an assisted constructor Correct answer: C. Declares an optional binding Explanation: Mod. 75. ElementsIntoSet: A. Contributes many items to a set B. Defines the key annotation C. Map key using an integer D. Mix injected and runtime parameters Correct answer: A. Contributes many items to a set Explanation: Mod. 76. IntoSet: A. Provider may return null with annotation B. Dependencies of the provided object C. Mix injected and runtime parameters D. Adds one item to a set Correct answer: D. Adds one item to a set Explanation: Mod. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -

77. IntoMap: A. Adds an entry to a map B. Use JvmSuppressWildcards in Kotlin C. Map key using an integer D. Map key using a string Correct answer: A. Adds an entry to a map Explanation: Mod. 78. Multibindings: A. Avoids creating extra code B. Map key using a string C. Collections built from many modules D. Map key using a class Correct answer: C. Collections built from many modules Explanation: Mod. 79. MapKey: A. Adds one item to a set B. Defines the key annotation C. Marks a provider method D. Map key using a string Correct answer: B. Defines the key annotation Explanation: Mod. 80. StringKey: A. Use clear qualifiers B. Provides new instances C. Adds an entry to a map D. Map key using a string Correct answer: D. Map key using a string Explanation: Mod. 81. ClassKey: A. Modules and bindings B. Explain what each module provides C. Creates on first get D. Map key using a class Correct answer: D. Map key using a class Explanation: Mod. Dagger Dependency Injection Practice Exam (Fundamentals, Components, Modules, Injection, Build and Testing, Design, Troubleshooting, Ethics) -