Prepare for the Android Development exam with our free practice test modules. Each quiz covers key topics to help you pass on your first try.
Try these questions from our free Android Development practice tests. The correct answer and an explanation follow each question.
What does the term 'memory leak' mean in Android development?
Answer: B. An object is kept in memory longer than its intended lifecycle
A memory leak occurs when references prevent the garbage collector from reclaiming objects whose lifecycle has ended, such as an Activity referenced by a static field.
What is a unit test in Android development?
Answer: A. A test that validates a single function or class in isolation without Android framework dependencies
Unit tests validate individual units of code like functions or classes in isolation, typically running on the JVM without Android dependencies.
Which class is used to encrypt data using the Android Keystore in modern Android?
Answer: A. Cipher
The Cipher class from javax.crypto is initialized with keys from the Android Keystore to perform encryption and decryption operations.
What is the purpose of a Foreground Service on modern Android versions?
Answer: C. Running user-visible ongoing work, like music playback, with a persistent notification
Foreground services perform noticeable ongoing work and must display a notification so the user knows they are running.