└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # android-interview-questions 2 | A collection of interview questions I've seen over the years :) 3 | 4 | • What is method overloading and overriding? 5 | 6 | • What is the difference between abstract classes and interfaces? 7 | 8 | • What happens if multiple interfaces have, the same methods? 9 | 10 | • If multiple interfaces contain default business logic and a class inherits all of them, what problems can arise? 11 | 12 | • What can replace multiple inheritance? 13 | 14 | • What is serialization when transferring data between activities? 15 | 16 | • The Serializable interface is empty- how does it work? 17 | 18 | • What is reified in Kotlin? 19 | 20 | • What concurrency utilities exist in Android? 21 | 22 | • What is a race condition? 23 | 24 | • can we use Mutex in coroutines? 25 | 26 | • Why can't we use synchronized in coroutines? 27 | 28 | • What is a coroutine? 29 | 30 | • How do we start coroutines? 31 | 32 | • If we start a coroutine with launch and spawn child coroutines inside it, what happens if one crashes? 33 | 34 | • What is the difference in error handling between launch and async? 35 | 36 | • Can we call coroutines from Java code? 37 | 38 | • What does a suspend function become when used in Java? 39 | 40 | • If we have a long-running task (e.g. downloading a file) and the user leaves the screen, how do we ensure the task 41 | continues? 42 | 43 | • what is the "when" keyword used for? What java construct does it replace? 44 | 45 | • how can you invoke a "suspend" function in kotlin? What are some features of a suspend function? 46 | 47 | • what are visibility modifiers in kotlin? 48 | 49 | • what do you understand by the terms of "polymorphism" and "inheritance", can you give examples of when you might use them? 50 | 51 | • how would you integrate jetpack compose into an existing xml app? 52 | 53 | • Hot vs cold flow (compare them) 54 | 55 | • Recomposition what is it and how to count it 56 | 57 | • Imagine a scenario where you created a room db with an ID , username and email, and all of those are a string, but you needed to change the ID to an int, how can you do it? (after the app with the old schema was published and downloaded by many users) 58 | 59 | • What is a coroutine 60 | 61 | • What is a coroutine context 62 | 63 | • Compare State flow and shared flow 64 | 65 | • Side effect in Compose (what is it?) 66 | 67 | • Build variant vs built flavour 68 | 69 | • How to cancel a coroutine, what to do if a coroutine still runs after cancellation 70 | 71 | • What is a memory leak, how to detect it 72 | 73 | • Koin vs Hilt, what is the main difference 74 | 75 | • MVVM vs MVP (compare how both operate), do you know any other architecture patterns 76 | 77 | • What is a coroutine scope, what scopes do you know 78 | 79 | • What is a view model responsible for in MVVM 80 | 81 | • What is characteristic for view model scope 82 | 83 | • How to secure an android app 84 | 85 | • What is a data class and what differences it from a normal class 86 | 87 | • How to handle saving data between recompositions and screen rotations in compose 88 | 89 | • What is dependency injection, what libraries are popular for DI 90 | 91 | • What is linting, what linting tools do you know 92 | 93 | • What are your favourite features in kotlin 94 | 95 | • How to secure an app from decompilation 96 | 97 | • How to ensure your unit tests are good, what should we unit test 98 | 99 | • How to ensure the code you've written cannot be "better" 100 | 101 | • How would you store sensitive user data in your local app database (assuming you have to) 102 | 103 | • How to ensure a composable is stable 104 | 105 | • How can you add a description that will be read by the TalkBack feature for a Button in Compose? 106 | 107 | • How would you check whether a library you're using has used an outdated version of another library? (if you cannot find the source code on Github nor open the lib in android studio) 108 | 109 | • Why cant a Kotlin library Module depend on an Android Library Module? 110 | 111 | • Explain the use-case of let, run, with, also, apply in Kotlin 112 | 113 | • How does one create a singleton in kotlin? Is your implementation thread safe? (can't use any external libraries) 114 | 115 | • What is Back Pressure in RxJava? How can one deal with back pressure? 116 | 117 | • How do you ensure that the data classes (stored in a library that you only have read-access to) are included in the release build? 118 | 119 | • Can a fragment exist (in memory and/or on screen) without a parent activity? 120 | 121 | • Is there a difference between lateinit and lazy in kotlin? if so, explain it 122 | 123 | • what's crossline and inline? 124 | 125 | • how does android secure application data from other apps? 126 | 127 | • Explain the meaning of "Restartable", "Skippable" and "Stable" in compose development, what may passing unstable parameters to a composable cause? 128 | 129 | • what is an ANR, how many seconds need to pass (ANR time) before the app throws an ANR? 130 | 131 | • can you install 2 (or more) applications, with the same package, on the same device? 132 | 133 | • What is Doze Mode and how does it affect background tasks and services? 134 | 135 | • Why were data classes created? were they a thing in java as well? what functions do data class offer that normal classes do not? 136 | 137 | • What is a memory leak, show me an example of a memory leak and how can you detect / fix them? 138 | 139 | • Can you compare R8 and Proguard? why do we need them in the first place? 140 | 141 | • Is it possible for an activity to run onDestroy() without running onPause() or onStop() first? If so give an example 142 | 143 | • what is the difference between const val and val? 144 | 145 | • If kotlin introduces null-safety, how did apps handle nullability in java? does null-safety in kotlin mean you can never get a NPE? 146 | 147 | --------------------------------------------------------------------------------