All questions

Kotlin and Android From Scratch Practice Test

Browse all practice questions for the Kotlin and Android From Scratch Practice Test. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

Kotlin and Android Practice Test 2026 – Complete Exam Prep Guide course image
All questions

These questions are part of the practice quiz. Start practicing

  • What does "Minimum SDK" refer to in an Android Studio project?
  • What is the name of the thread responsible for updating the screen in an Android app?
  • What are reasons to use a ViewModel?
  • What is an Activity in Android?
  • If a function already calls a suspend function, must it be marked as a suspend function itself?
  • What is a program in computing?
  • What error may occur in improperly written XML code for a TextView?
  • True or False: Every MainActivity class in Android must have a main() function.
  • Which of the following is NOT a benefit of using grid layouts?
  • What defines the specifics about a property in an object-oriented context?
  • What is the primary use of Shared Preferences in Android?
  • What is the purpose of the `with` keyword in Kotlin?
  • What can lead to a memory leak in Android applications regarding ViewModels?
  • A Job in Kotlin is defined as what type of unit?
  • Which of the following can be classified as suspend functions?
  • What is a BroadcastReceiver in Android?
  • What happens if you do not call `super.onCreate(savedInstanceState)` in an Activity?
  • Which statement is true about abstract classes?
  • What is an Android Service?
  • What happens if an abstract function is not implemented in a subclass?
  • What is a common use for the 'when' keyword in Kotlin?
  • What is the purpose of using a virtual device or emulator in Android Studio?
  • Is it possible to use the same ViewModel for multiple Activities or Fragments to share data?
  • What does a class describe in object-oriented programming?
  • In Android, what does `adb` stand for?
  • Why is it beneficial to use string resources instead of hard-coded strings?
  • What does API level signify in the Android development environment?
  • What is the purpose of the ActivityCompat class in Android?
  • Match the HTTP request elements to their corresponding responses: Status Messages, Status Code, HTTP Verb, Content-Type
  • Which of the following lifecycle methods can be called when the app returns to the foreground?
  • Which component is primarily responsible for managing UI in Kotlin Android applications?
  • How can you initiate a long-running task in Kotlin?
  • Which keyword is used to define a function in Kotlin?
  • How do you parse JSON in Kotlin using Kotlinx.serialization?
  • What feature does Kotlin provide for handling nullable types?
  • What do attributes such as textSize and textColor refer to in Android?
  • Why should LiveData be initialized and stored in a ViewModel?
  • What is the purpose of the `object` keyword in Kotlin?
  • Which of the following can be serialized using Moshi?
  • How would you modify the main() function to print a 6-layer cake for a 4th birthday?
  • What type of data can a class property hold?
  • In Kotlin, what is the purpose of using data classes in relation to JSON processing?
  • In the context of data binding layout expression, what is the correct syntax for adding a click listener attribute to a button?
  • What is a key benefit of class inheritance in programming?
  • How do you define a data class in Kotlin?
  • What is the Fragment in the context of Android development?
  • Which of the following is an example of a "constraint" in a ConstraintLayout?
  • How do you implement the ViewHolder pattern in RecyclerView?
  • Which tasks can be performed in onCreate()?
  • Which option correctly calls the function and passes valid input arguments?
  • What does IDE stand for in a development context?
  • What concept does a class represent in programming?
  • What does 'println()' do in Kotlin?
  • How can you handle errors in a coroutine?
  • What can you create multiple of from a single class in object-oriented programming?
  • What does `apply` do in Kotlin?
  • What is the purpose of a ViewModel in an Android application?
  • How do you define a variable in Kotlin?
  • Which of the following cannot be defined in an interface?
  • What is the expected output of the given Kotlin code?
  • What does observe allow you to monitor changes in?
  • How can you restrict a property's access to only within its class?
  • What is a good reason for adding comments to your code?
  • Which of the following elements is considered a View in an Android app?
  • Which of the following is true about Kotlin?
  • Which activity lifecycle method is triggered when a dialog obscures an activity?
  • What is the purpose of a constructor in a class?
  • Which of the following statements is false about async() and runBlocking() in Kotlin?
  • What method should be overridden to manage back navigation in an Android Activity?
  • What does the MutableLiveData class allow you to do?
  • Which method is typically used to inflate the UI for a fragment?
  • In what scenario would you use Local Storage instead of Shared Preferences?
  • In Kotlin coroutines, what represents a lightweight thread?
  • In which method should you handle the actions when a button in the app bar is pressed?
  • How do sealed classes work in Kotlin?
  • What is the correct purpose of the LiveData class in MVVM architecture?
  • How do you use Retrofit for network calls in Android?
  • What keyword is used to declare a property that can be initialized later in Kotlin?
  • What is the purpose of Gradle in Android development?
  • What is the main purpose of the `init` block in Kotlin?
  • What is the primary purpose of using Retrofit in Android?
  • How do you create a new Android project in Android Studio?
  • What is the correct order of activity lifecycle methods called when an app is opened and then exited using the back button?
  • What are Kotlin coroutines used for in Android?
  • Which of the following is another benefit of using string resources?
  • Which of the following statements about Gradle is true?
  • Which component in Android provides lightweight feedback messages?
  • Which annotation is used to define a custom Binding Adapter?
  • What is the function of an Intent in Android?
  • Is it recommended to execute time-consuming tasks in your Activity/Fragment?
  • How does the Android system handle configuration changes like screen rotations?
  • What is the main purpose of using LiveData in Android applications?
  • Which of the following is NOT a characteristic of Snackbar?
  • In which scenario would the onStop() method be executed for an activity?
  • True or False: Retrofit creates the code required to make network requests based on a web service.
  • In the context of ViewModels, what does 'survive configuration changes' mean?
  • What type of LiveData is used to return a different LiveData instance based on the value of another instance?
  • What does the KotlinJsonAdapterFactory() function do in relation to Moshi?
  • In the fragment lifecycle, which task is performed in the onViewCreated() method?
  • What is similar to a promise or future in other languages and serves as a placeholder for a return value?
  • What is one key advantage of using binding adapters in Android development?
  • Why is DataProviderManager declared with the object keyword?
  • How does the apply function in Kotlin help in configuring an object?
  • How do you typically end a block comment in Kotlin?
  • Which method must be overridden in the host activity for fragment-based navigation?
  • What is the role of the `by lazy` delegation in Kotlin?
  • What is the significance of null safety in Kotlin?
  • Which task should NOT be done in the onCreateView() method?
  • Which of the following describes how to create a new project in Android Studio?
  • Which keywords are valid in conditional statements in Kotlin?
  • How can you create a custom Dialog in Android?
  • Which of the following statements is true about the lifecycle of a single activity?
  • Which ViewType is used for creating a segmented view in Android?
  • Which statement about methods in relation to classes is true?
  • How do you create a custom View in Android?
  • What does the `override` keyword indicate in Kotlin?
  • In most apps, would you create coroutines using the global scope?
  • What does the 'fun' keyword represent in Kotlin?
  • What does Retrofit primarily simplify in Android development?
  • What does the method onDestroy() indicate about an activity?
  • How can you define custom attributes for a View in XML in Android?
  • Which of the following statements is false regarding intents?
  • What does the lifecycle method onPause() signify in an activity?
  • What format is typically used for defining resources in an Android application?
  • What are the main differences between `ArrayList` and `List` in Kotlin?
  • Which of the following are Kotlin data types?
  • In Kotlin, how do you denote a comment in your code?
  • What is a primary benefit of using a project template in Android Studio?
  • Which of the following accurately describes the purpose of a ViewModel in Android architecture?
  • What does `super.onCreate(savedInstanceState)` do in Android development?
  • What does the await() function do when used with async in Kotlin?
  • Which statement is true regarding the navigation graph file in a note-taking app?
  • What scope do coroutines run in by default?
  • When is a ViewModel destroyed?
  • What are Kotlin extension functions?
  • What step can be taken to change the color of your app's theme?
  • Which statement about XML layouts in Android is correct?
  • Which of the following are characteristics of a RESTful service?
  • How can you start a new activity in Kotlin?
  • What is the primary use of the `ViewModel` in Android architecture components?
  • Which of the following statements about Retrofit is false?
  • Which of the following statements about grid layouts is true?
  • How do you achieve dependency injection in Android with Dagger?
  • In what way does Kotlin handle nullability?
  • Which method in Activity class is called when the activity is no longer visible to the user?
  • What does the 'override' keyword indicate when used in a subclass?
  • How is LiveData observed in an Activity?
  • Which statement accurately describes a conditional statement?
  • What is the role of a MoshiConverterFactory in Retrofit?
  • Which of the following is NOT a density qualifier for Android icon resources?
  • What does the `lateinit` keyword do in Kotlin?
  • How can you serialize data in Kotlin?
  • Which of the following best describes a Fragment in Android?
  • Which function is needed to print output in Kotlin?
  • What is the main purpose of a ViewGroup?
  • What is a benefit of using fragments in Android development?
  • Which of the following are required to load and display an image with Coil?
  • What is the primary purpose of Kotlin in Android development?
  • Is it true that onCreateView() is only called once for a fragment's entire lifecycle?
  • Which statement about binding adapters is correct?
  • Where do you specify dependencies in Android Studio?
  • What is the difference between `MutableLiveData` and `LiveData`?
  • What is the main purpose of a CoroutineScope in Kotlin?
  • How do you define a variable in Kotlin that can only be assigned once?
  • What is the primary function of the `@BindingAdapter` annotation?
  • In the URL https://google.com/search?q=android, what is '/search' classified as?
  • What task should you perform in the onCreateView() method?
  • What would you use to handle permissions in a modern Android application?
  • Which of the following statements correctly defines a variable in Kotlin?
  • What is the function of the `onCreate` method in an Activity?
  • Which Kotlin feature allows extending existing classes without modifying them?
  • Which of the following are considered Attributes in Android? (Select all that apply)
  • Which statement is true about coroutines?
  • What is the primary benefit of using LiveData in an Android app?
  • Which of the following are considered pitfalls of directly using threads in your code?
  • In Android, what is a graphic that can be drawn to the screen referred to as?
  • What is responsible for determining which thread is used behind the scenes by a coroutine?
  • Why is the Material Components for Android library used?
  • In Android, what is the primary function of an Adapter?
  • What is the purpose of the AndroidManifest.xml file?
  • Is it okay for a ViewModel to directly reference a View class?
  • What happens when the following code is executed if the intent property is null? val message = intent.extras?.getString("message").toString()
  • What is a Content Provider in the Android framework?
  • Which of the following is NOT a way to create a comment in Kotlin?
  • How do you handle lifecycle events in Android?
  • What keyword is used in Kotlin to declare a suspended function?
  • What is primarily stored in the res/layout folder of an Android project?
  • What type of ViewGroup helps arrange the views in a flexible way?
  • What is the correct way to access the shared view model using the Kotlin property delegate approach?
  • What can you use to observe LiveData changes in Kotlin?
  • What is needed to make a network request with Retrofit?
  • What is the output type of the `observe` method in LiveData?
  • Which of the following is required for the Moshi library to successfully process JSON in Kotlin?
  • How do you implement a RecyclerView Adapter in Kotlin?
  • What class is typically used to customize the appearance of a Dialog in Android?
  • What are characteristics of app icons for Android apps?
  • Which of the following is an example of a class?
  • What is the function of the activity_main.xml file in an Android project?
  • What is a key difference between a class and an instance?
  • How can you declare a constant in Kotlin?
  • Which component helps to manage UI-related data lifecycle-consciously in Android?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy