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.

Master Kotlin & Android 2026: Jumpstart Your Journey with This Fun Practice Test! course image
All questions

These questions are part of the practice quiz. Start practicing

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

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy