├── .github
└── FUNDING.yml
├── .gitignore
├── LICENSE
├── README.md
├── Success.java
├── Success.kt
└── assets
└── banner-android-interview-questions.jpg
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [amitshekhariitbhu]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [yyyy] [name of copyright owner]
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | # Android Interview Questions and Answers
6 |
7 | > Android Interview Questions and Answers - Your Cheat Sheet For Android Interview
8 |
9 | ### Prepared and maintained by [Amit Shekhar](https://github.com/amitshekhariitbhu) - Coder | Teacher | Mentor | Open Source | IIT 2010-14
10 |
11 | ## About me
12 |
13 | Hi, I am Amit Shekhar, Co-Founder @ [Outcome School](https://outcomeschool.com) • IIT 2010-14 • I have taught and mentored many developers, and their efforts landed them high-paying tech jobs, helped many tech companies in solving their unique problems, and created many open-source libraries being used by top companies. I am passionate about sharing knowledge through open-source, blogs, and videos.
14 |
15 | You can connect with me on:
16 |
17 | - [Twitter](https://twitter.com/amitiitbhu)
18 | - [YouTube](https://www.youtube.com/@amitshekhar)
19 | - [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)
20 | - [GitHub](https://github.com/amitshekhariitbhu)
21 |
22 | ## **Join Outcome School and get high-paying tech job: [Outcome School](https://outcomeschool.com)**
23 |
24 | ## For knowledge-packed content: Subscribe to our [Outcome School YouTube Channel](https://www.youtube.com/@OutcomeSchool)
25 |
26 | ## Contents - Android Interview Questions
27 |
28 | * [Android Interview Questions and Answers Playlist](#android-interview-questions-and-answers-playlist)
29 | * [Kotlin Coroutines](#kotlin-coroutines)
30 | * [Kotlin Flow API](#kotlin-flow-api)
31 | * [Kotlin](#kotlin)
32 | * [Android](#android)
33 | * [Android Libraries](#android-libraries)
34 | * [Android Architecture](#android-architecture)
35 | * [Design Pattern](#design-pattern)
36 | * [Android System Design](#android-system-design) and check [Android System Design Interviews](https://outcomeschool.com/blog/android-system-design-interviews)
37 | * [Android Unit Testing](#android-unit-testing)
38 | * [Android Tools And Technologies](#android-tools-and-technologies)
39 | * [Java](#java)
40 | * [Jetpack Compose](#jetpack-compose)
41 | * [Other Topics](#other-topics)
42 | * [Data Structures and Algorithms](#data-structures-and-algorithms)
43 |
44 | ### Android Interview Questions and Answers Playlist
45 |
46 | - **Question**: Android Push Notification Flow using FCM
47 | - **Answer**: [Android Push Notification Flow using FCM](https://www.youtube.com/watch?v=TrufwW4ILHg)
48 | - **Question**: What is an inline function in Kotlin?
49 | - **Answer**: [What is an inline function in Kotlin?](https://www.youtube.com/watch?v=GLLI8h67ryo)
50 | - **Question**: What is the advantage of using const in Kotlin?
51 | - **Answer**: [What is the advantage of using const in Kotlin?](https://www.youtube.com/watch?v=3G49ivVxfkU)
52 | - **Question**: What is a reified keyword in Kotlin?
53 | - **Answer**: [What is a reified keyword in Kotlin?](https://www.youtube.com/watch?v=kD2T84FnTck)
54 | - **Question**: Suspending vs Blocking in Kotlin Coroutines
55 | - **Answer**: [Suspending vs Blocking in Kotlin Coroutines](https://www.youtube.com/watch?v=V2lL_aJp17I)
56 | - **Question**: Launch vs Async in Kotlin Coroutines
57 | - **Answer**: [Launch vs Async in Kotlin Coroutines](https://www.youtube.com/watch?v=B4AfTPpCU5o)
58 | - **Question**: internal visibility modifier in Kotlin
59 | - **Answer**: [internal visibility modifier in Kotlin](https://www.youtube.com/watch?v=wOHpuf74-cI)
60 | - **Question**: open keyword in Kotlin
61 | - **Answer**: [open keyword in Kotlin](https://www.youtube.com/watch?v=bfpNDWNE6I0)
62 | - **Question**: lateinit vs lazy in Kotlin
63 | - **Answer**: [lateinit vs lazy in Kotlin](https://www.youtube.com/watch?v=IU2ZktdM-fo)
64 | - **Question**: What is Multidex in Android?
65 | - **Answer**: [What is Multidex in Android?](https://www.youtube.com/watch?v=R0zd8lmHnmE)
66 | - **Question**: How does the Android Push Notification system work?
67 | - **Answer**: [How does the Android Push Notification system work?](https://www.youtube.com/watch?v=810IFG2sWlc)
68 | - **Question**: How does the Kotlin Multiplatform work?
69 | - **Answer**: [How does the Kotlin Multiplatform work?](https://www.youtube.com/watch?v=nwfNh6Kd5hI)
70 | - **Question**: What is a ViewModel and how is it useful?
71 | - **Answer**: [What is a ViewModel and how is it useful?](https://www.youtube.com/watch?v=ORtieK5f_zg)
72 | - **Question**: Is it possible to force the Garbage Collection in Android?
73 | - **Answer**: [Is it possible to force Garbage Collection in Android?](https://www.youtube.com/watch?v=fPEjpFKo1-Q)
74 | - **Question**: What is a JvmStatic Annotation in Kotlin?
75 | - **Answer**: [What is a JvmStatic Annotation in Kotlin?](https://www.youtube.com/watch?v=qBBbOhY_pv4)
76 | - **Question**: init block in Kotlin
77 | - **Answer**: [init block in Kotlin](https://www.youtube.com/watch?v=cb3jOFozJns)
78 | - **Question**: JvmField Annotation in Kotlin
79 | - **Answer**: [JvmField Annotation in Kotlin](https://www.youtube.com/watch?v=bx8OZcMbeUE)
80 | - **Question**: singleTask launchMode in Android
81 | - **Answer**: [singleTask launchMode in Android](https://www.youtube.com/watch?v=WYkQEnm4jeI)
82 | - **Question**: Difference between == and === in Kotlin
83 | - **Answer**: [Difference between == and === in Kotlin](https://www.youtube.com/watch?v=lJtgxT2OIgQ)
84 | - **Question**: JvmOverloads Annotation in Kotlin
85 | - **Answer**: [JvmOverloads Annotation in Kotlin](https://www.youtube.com/watch?v=fHGsBV9Za8M)
86 | - **Question**: Why is it recommended to use only the default constructor to create a Fragment?
87 | - **Answer**: [Why is it recommended to use only the default constructor to create a Fragment?](https://www.youtube.com/watch?v=CitBt0FZFIc)
88 | - **Question**: Why do we need to call setContentView() in onCreate() of Activity class?
89 | - **Answer**: [Why do we need to call setContentView() in onCreate() of Activity class?](https://www.youtube.com/watch?v=U1aHAt7XC5I)
90 | - **Question**: When only onDestroy is called for an activity without onPause() and onStop()?
91 | - **Answer**: [When only onDestroy is called for an activity without onPause() and onStop()?](https://www.youtube.com/watch?v=B2kY_ckZa-g)
92 |
93 | ### Kotlin Coroutines
94 |
95 | Topics you should know in **Kotlin Coroutines** for Android Interview:
96 |
97 | * coroutines
98 | * suspend
99 | * launch, async-await, withContext
100 | * dispatchers
101 | * scope, context, job
102 | * lifecycleScope, viewModelScope, GlobalScope
103 | * suspendCoroutine, suspendCancellableCoroutine
104 | * coroutineScope, supervisorScope
105 |
106 | Learn the above-mentioned from the following links:
107 |
108 | - [Master Kotlin Coroutines](https://outcomeschool.com/blog/kotlin-coroutines)
109 | - [Suspending vs Blocking in Kotlin Coroutines](https://www.youtube.com/watch?v=V2lL_aJp17I)
110 | - [Launch vs Async in Kotlin Coroutines](https://www.youtube.com/watch?v=B4AfTPpCU5o)
111 | - [Dispatchers in Kotlin Coroutines](https://outcomeschool.com/blog/dispatchers-in-kotlin-coroutines)
112 | - [coroutineScope vs supervisorScope](https://outcomeschool.com/blog/coroutinescope-vs-supervisorscope)
113 | - [suspend function in Kotlin Coroutines](https://outcomeschool.com/blog/suspend-function-in-kotlin-coroutines)
114 | - [Kotlin withContext vs Async-await](https://outcomeschool.com/blog/kotlin-withcontext-vs-async-await)
115 | - [CoroutineContext in Kotlin](https://outcomeschool.com/blog/coroutinecontext-in-kotlin)
116 | - [Callback to Coroutines in Kotlin](https://outcomeschool.com/blog/callback-to-coroutines-in-kotlin)
117 | - [Retrofit with Kotlin Coroutines](https://outcomeschool.com/blog/retrofit-with-kotlin-coroutines)
118 | - [Parallel Multiple Network Calls Using Kotlin Coroutines](https://outcomeschool.com/blog/parallel-multiple-network-calls-using-kotlin-coroutines)
119 | - [Room Database with Kotlin Coroutines](https://outcomeschool.com/blog/room-database-with-kotlin-coroutines)
120 | - [Unit Testing ViewModel with Kotlin Coroutines and LiveData](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-coroutines-and-livedata)
121 |
122 | ### Kotlin Flow API
123 |
124 | Topics you should know in **Kotlin Flow API** for Android Interview:
125 |
126 | * Flow Builder, Operator, Collector
127 | * flowOn, dispatchers
128 | * Operators such as filter, map, zip, flatMapConcat, retry, debounce, distinctUntilChanged, flatMapLatest
129 | * Terminal operators
130 | * Cold Flow vs Hot Flow
131 | * StateFlow, SharedFlow, callbackFlow, channelFlow
132 |
133 | Learn the above-mentioned from the following links:
134 |
135 | - [Mastering Flow API in Kotlin](https://outcomeschool.com/blog/flow-api-in-kotlin)
136 | - [Creating Flow Using Flow Builder in Kotlin](https://outcomeschool.com/blog/creating-flow-using-flow-builder-in-kotlin)
137 | - [Terminal Operators in Kotlin Flow](https://outcomeschool.com/blog/terminal-operators-in-kotlin-flow)
138 | - [Cold Flow vs Hot Flow](https://outcomeschool.com/blog/cold-flow-vs-hot-flow)
139 | - [StateFlow and SharedFlow](https://outcomeschool.com/blog/stateflow-and-sharedflow)
140 | - [Long-running tasks in parallel with Kotlin Flow](https://outcomeschool.com/blog/long-running-tasks-in-parallel-with-kotlin-flow)
141 | - [Retry Operator in Kotlin Flow](https://outcomeschool.com/blog/retry-operator-in-kotlin-flow)
142 | - [Retrofit with Kotlin Flow](https://outcomeschool.com/blog/retrofit-with-kotlin-flow)
143 | - [Room Database with Kotlin Flow](https://outcomeschool.com/blog/room-database-with-kotlin-flow)
144 | - [Kotlin Flow Zip Operator for Parallel Multiple Network Calls](https://outcomeschool.com/blog/kotlin-flow-zip-operator-parallel-multiple-network-calls)
145 | - [Instant Search Using Kotlin Flow Operators](https://outcomeschool.com/blog/instant-search-using-kotlin-flow-operators)
146 | - [callbackFlow - Callback to Flow API in Kotlin](https://outcomeschool.com/blog/callback-to-flow-api-in-kotlin)
147 | - [Exception Handling in Kotlin Flow](https://outcomeschool.com/blog/exception-handling-in-kotlin-flow)
148 | - [Unit Testing ViewModel with Kotlin Flow and StateFlow](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-flow-and-stateflow)
149 |
150 | ### Kotlin
151 |
152 | Android Interview Questions and Answers:
153 |
154 | * **15 Kotlin Interview Questions and Answers**: [Check the PDF](https://www.linkedin.com/posts/outcomeschool_kotlin-interview-questions-and-answers-activity-7276115620536954880-cFUa)
155 |
156 | * **What is the advantage of using const in Kotlin?** - [Video](https://www.youtube.com/watch?v=3G49ivVxfkU) and [Blog](https://outcomeschool.com/blog/const-in-kotlin)
157 |
158 | * **When to use lateinit keyword used in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/lateinit-vs-lazy-in-kotlin)
159 |
160 | * **What is inline function in Kotlin?** - [Video](https://www.youtube.com/watch?v=GLLI8h67ryo) and [Blog](https://outcomeschool.com/blog/inline-function-in-kotlin)
161 |
162 | * **What are `companion objects` in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/companion-object-in-kotlin)
163 |
164 | * **Extension functions** - [Learn from here](https://outcomeschool.com/blog/extension-function-in-kotlin)
165 |
166 | * **What is a data class in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/data-class-in-kotlin)
167 |
168 | * **Remove duplicates from an array in Kotlin** - [Learn from here](https://outcomeschool.com/blog/remove-duplicates-from-an-array-in-kotlin)
169 |
170 | * **What is a JvmStatic Annotation in Kotlin?** - [Video](https://www.youtube.com/watch?v=qBBbOhY_pv4) and [Blog](https://outcomeschool.com/blog/jvmstatic-annotation-in-kotlin)
171 |
172 | * **What is a JvmField Annotation in Kotlin?** - [Video](https://www.youtube.com/watch?v=bx8OZcMbeUE) and [Blog](https://outcomeschool.com/blog/jvmfield-annotation-in-kotlin)
173 |
174 | * **What is a JvmOverloads Annotation in Kotlin?** - [Video](https://www.youtube.com/watch?v=fHGsBV9Za8M) and [Blog](https://outcomeschool.com/blog/jvmoverloads-annotation-in-kotlin)
175 |
176 | * **noinline in Kotlin** - [Learn from here](https://outcomeschool.com/blog/noinline-in-kotlin)
177 |
178 | * **crossinline in Kotlin** - [Learn from here](https://outcomeschool.com/blog/crossinline-in-kotlin)
179 |
180 | * **scope functions in Kotlin** - [Learn from here](https://kotlinlang.org/docs/scope-functions.html)
181 |
182 | * **What is a reified keyword in Kotlin?** - [Learn from here](https://www.youtube.com/watch?v=kD2T84FnTck)
183 |
184 | * **lateinit vs lazy in Kotlin** - [Learn from here](https://outcomeschool.com/blog/lateinit-vs-lazy-in-kotlin)
185 |
186 | * **What is an `init` block in Kotlin?** - [Video](https://www.youtube.com/watch?v=cb3jOFozJns) and [Blog](https://outcomeschool.com/blog/init-block-in-kotlin)
187 |
188 | * **Difference between == and === in Kotlin** - [Video](https://www.youtube.com/watch?v=lJtgxT2OIgQ) and [Blog](https://outcomeschool.com/blog/structural-and-referential-equality-in-kotlin)
189 |
190 | * **Advantage of using const in Kotlin** - [Learn from here](https://www.youtube.com/watch?v=3G49ivVxfkU)
191 |
192 | * **What are higher-order functions in Kotlin?** - Learn from here: [Higher-Order Functions and Lambdas in Kotlin](https://outcomeschool.com/blog/higher-order-functions-and-lambdas-in-kotlin)
193 |
194 | * **Write a function(Higher-Order Function) that returns a function.** - [Check solution here](https://x.com/amitiitbhu/status/1862721662208155800)
195 |
196 | * **What are Lambdas in Kotlin** - Learn from here: [Higher-Order Functions and Lambdas in Kotlin](https://outcomeschool.com/blog/higher-order-functions-and-lambdas-in-kotlin)
197 |
198 | * **AssociateBy - List to Map in Kotlin** - [Learn from here](https://outcomeschool.com/blog/associateby-list-to-map-in-kotlin)
199 |
200 | * **Open keyword in Kotlin** - [Learn from here](https://outcomeschool.com/blog/open-keyword-in-kotlin)
201 |
202 | * **Companion object in Kotlin** - [Learn from here](https://outcomeschool.com/blog/companion-object-in-kotlin)
203 |
204 | * **internal visibility modifier in Kotlin** - [Learn from here](https://youtu.be/wOHpuf74-cI)
205 |
206 | * **partition - filtering function in Kotlin** - [Learn from here](https://outcomeschool.com/blog/partition-filtering-function-in-kotlin)
207 |
208 | * **Infix notation in Kotlin** - [Learn from here](https://outcomeschool.com/blog/infix-notation-in-kotlin)
209 |
210 | * **How does the Kotlin Multiplatform work?** - [Learn from here](https://youtu.be/nwfNh6Kd5hI)
211 |
212 | * **Suspending vs Blocking in Kotlin Coroutines** - [Learn from here](https://www.youtube.com/watch?v=V2lL_aJp17I)
213 |
214 | * **What is runBlocking in Coroutines?** - [Learn from here](https://x.com/outcome_school/status/1861455930061156797)
215 |
216 | * **What is the meaning of structured concurrency in Kotlin Coroutines?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7267476661967683584-wDCh/)
217 |
218 | * **String vs StringBuffer vs StringBuilder** - [Learn from here](https://outcomeschool.com/blog/string-vs-stringbuffer-vs-stringbuilder)
219 |
220 | * **What is the difference between `val` and `var`?** - [Learn from here](https://stackoverflow.com/questions/44200075/val-and-var-in-kotlin)
221 |
222 | * **How to check if a `lateinit` variable has been initialized?** - [Learn from here](https://outcomeschool.com/blog/lateinit-vs-lazy-in-kotlin)
223 |
224 | * **How to do lazy initialization of variables in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/lateinit-vs-lazy-in-kotlin)
225 |
226 | * **What are the visibility modifiers in Kotlin?** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineer-tech-activity-7305070243620544512-NqDW)
227 |
228 | * **What is the equivalent of Java static methods in Kotlin?** - [Learn from here](https://stackoverflow.com/questions/40352684/what-is-the-equivalent-of-java-static-methods-in-kotlin)
229 |
230 | * **How to create a Singleton class in Kotlin?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7297112198252806144-97Eh)
231 |
232 | * **What is the difference between `open` and `public` in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/open-keyword-in-kotlin)
233 |
234 | * **`apply` scope function and its use cases** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7302625113240154114-GNgz)
235 |
236 | * **`let` scope function and its use cases** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7297672603203223552-_9zp)
237 |
238 | * **Explain the use-case of `let`, `run`, `with`, `also`, `apply` in Kotlin.** - Learn from [here](https://kotlinlang.org/docs/scope-functions.html) and [here](https://stackoverflow.com/questions/45977011/example-of-when-should-we-use-run-let-apply-also-and-with-on-kotlin)
239 |
240 | * **How to choose between `apply` and `with`?** - Learn from [here](https://kotlinlang.org/docs/scope-functions.html) and [here](https://stackoverflow.com/questions/45977011/example-of-when-should-we-use-run-let-apply-also-and-with-on-kotlin)
241 |
242 | * **Difference between List and Array types in Kotlin** - [Learn from here](https://stackoverflow.com/questions/36262305/difference-between-list-and-array-types-in-kotlin)
243 |
244 | * **What are `Labels` in Kotlin?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7305796789159215105-oEUj)
245 |
246 | * **What are Coroutines in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/kotlin-coroutines)
247 |
248 | * **What is Coroutine Scope?** - [Learn from here](https://outcomeschool.com/blog/kotlin-coroutines)
249 |
250 | * **Scopes in Kotlin Coroutines Used in Android** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7278639980053217280-8eZO)
251 |
252 | * **What is Coroutine Context?** - [Learn from here](https://outcomeschool.com/blog/coroutinecontext-in-kotlin)
253 |
254 | * **Launch vs Async in Kotlin Coroutines** - [Learn from here](https://outcomeschool.com/blog/launch-vs-async-in-kotlin-coroutines)
255 |
256 | * **Thread.sleep() vs delay() in Kotlin** - [Learn from here](https://x.com/amitiitbhu/status/1812806101944946962)
257 |
258 | * **Explain inline classes in Kotlin** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineering-tech-activity-7251812269804724224-TR6Y)
259 |
260 | * **Sealed Classes in Kotlin** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_sealed-classes-in-kotlin-activity-7311611732269887488-nKZI)
261 |
262 | * **Tell about the Collections in Kotlin** - [Learn from here](https://kotlinlang.org/docs/collections-overview.html)
263 |
264 | * **What does ?: do in Kotlin? (Elvis Operator)** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7269313270669295618-g6kJ)
265 |
266 | * **timeouts in Kotlin Coroutines** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7265684677770846208-Ug0Y)
267 |
268 | * **How do you combine multiple coroutine results?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7267827335393873920-v6t3)
269 |
270 | * **What is a Job in Coroutines?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7268842850140721153-vw9E)
271 |
272 | * **Coroutines job.cancel() vs scope.cancel()** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7321028335784894465-HCrl)
273 |
274 | * **How to Implement Debounce Using Coroutines?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7285163906686164994-tOUK)
275 |
276 | * **Kotlin code snippet demonstrating how to run two coroutines in series and parallel** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7297944609614139392-h9NZ/)
277 |
278 | * **yield in Kotlin Coroutines** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7298934394113638400-ZY-y)
279 |
280 | * **Delegates in Kotlin** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7301107785302249474-WyDC)
281 |
282 | * **stateIn vs shareIn in Kotlin Flow** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_statein-vs-sharein-in-kotlin-flow-activity-7315963238318321664-BdYk)
283 |
284 | * **flatMapConcat, flatMapMerge, and flatMapLatest in Kotlin Flow** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7316049746022801409-OoTY)
285 |
286 | * **collect vs collectLatest in Kotlin Flow** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_kotlin-androiddev-activity-7316095893273788417-BJSn)
287 |
288 | ### Android
289 |
290 | Android Interview Questions and Answers:
291 |
292 | #### Base
293 |
294 | * **Why does an Android App lag?** - [Learn from here](https://outcomeschool.com/blog/android-app-lag)
295 |
296 | * **What is `Context`? How is it used?** - [Context In Android Application](https://outcomeschool.com/blog/context-in-android-application)
297 |
298 | * **Tell all the Android application components.** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7302543942028251137-S3vJ)
299 |
300 | * **What is the project structure of an Android Application?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_android-app-project-structure-activity-7302902092812226560-bM8D)
301 |
302 | * **What is `AndroidManifest.xml`?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7305255303908888576-c0Nf)
303 |
304 | * **What is the `Application` class?** -[Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7304864185010528256-2GGU)
305 |
306 | #### Activity and Fragment
307 |
308 | * **Why is it recommended to use only the default constructor to create a `Fragment`?** - Learn from [video](https://www.youtube.com/watch?v=CitBt0FZFIc) and [blog](https://outcomeschool.com/blog/default-constructor-to-create-a-fragment)
309 |
310 | * **What is `Activity` and its lifecycle?** - [Learn from here](https://developer.android.com/guide/components/activities/activity-lifecycle)
311 |
312 | * **What is the difference between onCreate() and onStart()** - [Learn from here](https://developer.android.com/guide/components/activities/activity-lifecycle)
313 |
314 | * **When only onDestroy is called for an activity without onPause() and onStop()?** - [Learn from here](https://www.youtube.com/watch?v=B2kY_ckZa-g)
315 |
316 | * **Why do we need to call setContentView() in onCreate() of Activity class?** - [Learn from here](https://www.youtube.com/watch?v=U1aHAt7XC5I)
317 |
318 | * **What is onSaveInstanceState() and onRestoreInstanceState() in activity?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7301985158608392193-pA5M)
319 |
320 | * **What is `Fragment` and its lifecycle?** - [Learn from here](https://developer.android.com/guide/fragments/lifecycle)
321 |
322 | * **What are "launchMode"?** - [Learn from here](https://outcomeschool.com/blog/singletask-launchmode-in-android) and [singleTask launchMode in Android](https://youtu.be/WYkQEnm4jeI)
323 |
324 | * **What is the difference between a `Fragment` and an `Activity`? Explain the relationship between the two.** - [Learn from here](https://stackoverflow.com/questions/10478233/why-fragments-and-when-to-use-fragments-instead-of-activities)
325 |
326 | * **When should you use a Fragment rather than an Activity?**
327 | - When you have some UI components to be used across various activities
328 | - When multiple views can be displayed side by side just like ViewPager
329 |
330 | * **What is the difference between FragmentPagerAdapter vs FragmentStatePagerAdapter?**
331 | - FragmentPagerAdapter: Each fragment visited by the user will be stored in the memory but the view will be destroyed. When the page is revisited, then the view will be created not the instance of the fragment.
332 | - FragmentStatePagerAdapter: Here, the fragment instance will be destroyed when it is not visible to the user, except the saved state of the fragment.
333 |
334 | * **What is the difference between adding/replacing fragment in backstack?** - [Learn from here](https://stackoverflow.com/questions/24466302/basic-difference-between-add-and-replace-method-of-fragment/24466345)
335 |
336 | * **How would you communicate between two Fragments?**
337 |
338 | * **What is retained `Fragment`?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7265620144289193984-hlpH)
339 |
340 | * **What is the purpose of `addToBackStack()` while commiting fragment transaction?**
341 | - By calling addToBackStack(), the replace transaction is saved to the back stack so the user can reverse the transaction and bring back the previous fragment by pressing the Back button. For more [Learn from here](https://stackoverflow.com/questions/22984950/what-is-the-meaning-of-addtobackstack-with-null-parameter)
342 |
343 | #### Views and ViewGroups
344 |
345 | * **Optimizing layouts in Android** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7269208182390951936-dAg3)
346 |
347 | * **What is `View` in Android?**
348 |
349 | * **Difference between `View.GONE` and `View.INVISIBLE`?** - [Learn from here](https://stackoverflow.com/questions/11556607/android-difference-between-invisible-and-gone)
350 |
351 | * **Can you a create custom view? How?**
352 |
353 | * **What are ViewGroups and how they are different from the Views?**
354 | - View: View objects are the basic building blocks of User Interface(UI) elements in Android. View is a simple rectangle box which responds to the user’s actions. Examples are EditText, Button, CheckBox etc. View refers to the android.view.View class, which is the base class of all UI classes.
355 | - ViewGroup: ViewGroup is the invisible container. It holds View and ViewGroup. For example, LinearLayout is the ViewGroup that contains Button(View), and other Layouts also. ViewGroup is the base class for Layouts.
356 |
357 | * **What is a Canvas?** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_androiddev-android-activity-7301608732671520771-7WLF)
358 |
359 | * **What is a `SurfaceView`?** - [Learn from here](https://developer.android.com/reference/android/view/SurfaceView)
360 |
361 | * **Relative Layout vs Linear Layout.**
362 |
363 | * **Tell about Constraint Layout optimization** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_constraintlayout-in-android-uses-the-cassowary-activity-7303624644165545993-xUBG)
364 |
365 | * **Do you know what is the view tree? How can you optimize its depth?** - [Learn from here](https://developer.android.com/reference/android/view/ViewTreeObserver)
366 |
367 | #### Displaying Lists of Content
368 |
369 | * **What is the difference between `ListView` and `RecyclerView`?** - [Learn from here](https://stackoverflow.com/questions/26728651/recyclerview-vs-listview)
370 |
371 | * **How does the RecyclerView work?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7268187299811606528-u2_w)
372 |
373 | * **RecyclerView Optimization - Scrolling Performance Improvement** - [Learn from here](https://outcomeschool.com/blog/recyclerview-optimization)
374 |
375 | * **Optimizing Nested RecyclerView** - [Learn from here](https://outcomeschool.com/blog/setrecycledviewpool-for-optimizing-nested-recyclerview)
376 |
377 | * **How does RecyclerView improve performance over ListView?**
378 |
379 | * **What are the components of a RecyclerView?**
380 |
381 | * **Explain the role of RecyclerView.Adapter and RecyclerView.ViewHolder** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7274733205927182337-hvTG)
382 |
383 | * **What is a LayoutManager in RecyclerView?**
384 |
385 | * **How do you handle multiple view types in a single RecyclerView?**
386 |
387 | * **What is DiffUtil and how does it improve RecyclerView performance?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7279435764973686785-pfiQ)
388 |
389 | * **What is the purpose of RecyclerView.setHasFixedSize(true)?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7282252857637007361-thzv/)
390 |
391 | * **How do you update a specific item in RecyclerView?**
392 |
393 | * **What is `SnapHelper`?** - Learn from here: [SnapHelper](https://outcomeschool.com/blog/snaphelper)
394 |
395 | #### Dialogs and Toasts
396 |
397 | * **What is `Dialog` in Android?** - [Learn from here](https://developer.android.com/guide/topics/ui/dialogs)
398 |
399 | * **What is `Toast` in Android?** - [Learn from here](https://developer.android.com/guide/topics/ui/notifiers/toasts)
400 |
401 | * **What the difference between `Dialog` and `Dialog Fragment`?** - [Learn from here](https://stackoverflow.com/questions/7977392/android-dialogfragment-vs-dialog)
402 |
403 | #### Intents and Broadcasting
404 |
405 | * **What is `Intent`?** - [Learn from here](https://developer.android.com/guide/components/intents-filters)
406 |
407 | * **What is an Implicit `Intent`?** - [Learn from here](https://developer.android.com/guide/components/intents-filters)
408 |
409 | * **What is an Explicit `Intent`?** - [Learn from here](https://developer.android.com/guide/components/intents-filters)
410 |
411 | * **What is a `BroadcastReceiver`?** - [Learn from here](https://developer.android.com/guide/components/broadcasts)
412 |
413 | * **What is a Sticky `Intent`?**
414 | - Sticky Intents allows communication between a function and a service. sendStickyBroadcast() performs a sendBroadcast(Intent) known as sticky, i.e. the Intent you are sending stays around after the broadcast is complete, so that others can quickly retrieve that data through the return value of registerReceiver(BroadcastReceiver, IntentFilter). For example, if you take an intent for ACTION_BATTERY_CHANGED to get battery change events: When you call registerReceiver() for that action — even with a null BroadcastReceiver — you get the Intent that was last Broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.
415 |
416 | * **Describe how broadcasts and intents work to be able to pass messages around your app?** - [Learn from here](https://stackoverflow.com/questions/7276537/using-a-broadcast-intent-broadcast-receiver-to-send-messages-from-a-service-to-a)
417 |
418 | * **What is a `PendingIntent`?**
419 | - If you want someone to perform any Intent operation at future point of time on behalf of you, then we will use Pending Intent.
420 |
421 | * **What are the different types of Broadcasts?** - [Learn from here](https://developer.android.com/guide/components/broadcasts)
422 |
423 | #### Services
424 |
425 | * **Explain Android Service Lifecycle** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7265212180570992640-CJn_)
426 |
427 | * **What is Service?** - [Learn from here](https://developer.android.com/guide/components/services)
428 |
429 | * **On which thread does a Service run in Android?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7283717741130215424-Vn39)
430 |
431 | * **Service vs IntentService** - [Learn from here](https://stackoverflow.com/questions/15524280/service-vs-intentservice-in-the-android-platform)
432 |
433 | * **What is a Foreground Service?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_foreground-service-in-android-activity-7303268432030879745-TFVI)
434 |
435 | * **What is a `JobScheduler`?** - [Learn from here](https://developer.android.com/reference/android/app/job/JobScheduler)
436 |
437 | * **How Does WorkManager Guarantee Task Execution?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_how-does-workmanager-guarantee-task-execution-activity-7320301933691310080-GpCR)
438 |
439 | #### Inter-process Communication
440 |
441 | * **How can two distinct Android apps interact?** - [Learn from here](https://developer.android.com/training/basics/intents)
442 |
443 | * **Is it possible to run an Android app in multiple processes? How?** - [Learn from here](https://stackoverflow.com/questions/6567768/how-can-an-android-application-have-more-than-one-process)
444 |
445 | * **What is AIDL? Enumerate the steps in creating a bounded service through AIDL.** - [Learn from here](https://developer.android.com/guide/components/aidl)
446 |
447 | * **What can you use for background processing in Android?** - [Learn from here](https://developer.android.com/guide/background)
448 |
449 | * **What is a `ContentProvider` and what is it typically used for?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7268117553040764931-64fI)
450 |
451 | #### Long-running Operations
452 |
453 | * **How to run parallel tasks and get a callback when all are complete?** - [Long-running tasks in parallel with Kotlin Flow](https://outcomeschool.com/blog/long-running-tasks-in-parallel-with-kotlin-flow)
454 |
455 | * **What is ANR? How can the ANR be prevented?** - [Learn from here](https://developer.android.com/topic/performance/vitals/anr.html)
456 |
457 | * **ThreadPool Advantages** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineer-tech-activity-7308034827574816768-RwEE)
458 |
459 | * **What is an `AsyncTask`(Deprecated in API level 30) ?**
460 |
461 | * **What are the problems in AsyncTask?**
462 |
463 | * **Daemon Threads vs. User Threads** - [Learn from here](https://x.com/amitiitbhu/status/1817783254885478872)
464 |
465 | * **Explain `Looper`, `Handler`, and `HandlerThread`.**
466 |
467 | * **Garbage Collection** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_java-tech-softwareengineer-activity-7308111597581799425-qZN0)
468 |
469 | * **Android Memory Leak**
470 |
471 | * **Can you explain the difference between a Runnable and a Thread in Android?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7279784055284420609-Xa8b)
472 |
473 | #### Working With Multimedia Content
474 |
475 | * **How do you handle bitmaps in Android as it takes too much memory?** - [Learn from here](https://developer.android.com/topic/performance/graphics/load-bitmap) and [here](https://developer.android.com/topic/performance/graphics/manage-memory)
476 |
477 | * **Tell about the `Bitmap` pool.** - [Learn from here](https://outcomeschool.com/blog/bitmap-pool)
478 |
479 | #### Data Saving
480 |
481 | * **Jetpack DataStore Preferences** - [Learn from here](https://outcomeschool.com/blog/jetpack-datastore-preferences)
482 |
483 | * **Persisting Data in an Android App** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7301836718003888128-oNi2)
484 |
485 | * **What is ORM? How does it work?**
486 |
487 | * **How would you preserve the `Activity` state during a screen rotation?** - [Learn from here](https://www.youtube.com/watch?v=ORtieK5f_zg)
488 |
489 | * **What are different ways to store data in your Android app?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7301836718003888128-oNi2)
490 |
491 | * **Explain Scoped Storage in Android.**
492 |
493 | * **How to encrypt data in Android?**
494 |
495 | * **What is commit() and apply() in SharedPreferences?**
496 | - commit() returns a boolean value of success or failure immediately by writing data synchronously.
497 | - apply() is asynchronous and it won't return any boolean response. If you have an apply() outstanding and you are performing commit(), then the commit() will be blocked until the apply() is not completed.
498 |
499 | #### Look and Feel
500 |
501 | * **What is a `Spannable`?**
502 |
503 | * **What is a `SpannableString`?**
504 | - A SpannableString has immutable text, but its span information is mutable. Use a SpannableString when your text doesn't need to be changed but the styling does. Spans are ranges over the text that include styling information like color, highlighting, italics, links, etc
505 |
506 | * **What are the best practices for using text in Android?**
507 |
508 | * **How to implement Dark mode in any application?**
509 |
510 | #### Memory Optimizations
511 |
512 | * **Improve Android App Performance** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7314877712815345664-iB7z)
513 |
514 | * **What is the `onTrimMemory()` method?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7267752779727679488--kk4)
515 |
516 | * **How to identify and fix OutOfMemory issues?**
517 |
518 | * **How do you find memory leaks in Android applications?**
519 |
520 | #### Battery Life Optimizations
521 |
522 | * **How to reduce battery usage in an Android application?**
523 |
524 | * **What is Doze? What about App Standby?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_androiddev-activity-7319939901418795008-KRql)
525 |
526 | * **What is `overdraw`?** - [Learn from here](https://developer.android.com/topic/performance/rendering/overdraw.html)
527 |
528 | #### Supporting Different Screen Sizes
529 |
530 | * **How do you support different types of resolutions?** - [Learn from here](https://developer.android.com/training/multiscreen/screensizes)
531 |
532 | #### Permissions
533 |
534 | * **What are the different protection levels in permission?**
535 |
536 | #### Native Programming
537 |
538 | * **What is the NDK and why is it useful?** - Learn from here: [Android NDK and RenderScript](https://outcomeschool.com/blog/ndk-and-renderscript)
539 |
540 | * **What is renderscript?** - Learn from here: [Android NDK and RenderScript](https://outcomeschool.com/blog/ndk-and-renderscript)
541 |
542 | #### Android System Internal
543 |
544 | * **What is Android Runtime?** - [Android Runtime](https://outcomeschool.com/blog/dalvik-art-jit-aot)
545 |
546 | * **Dalvik, ART, JIT, and AOT in Android** - [Dalvik, ART, JIT, and AOT](https://outcomeschool.com/blog/dalvik-art-jit-aot)
547 |
548 | * **What are the differences between Dalvik and ART?** - [Difference between Dalvik and ART](https://outcomeschool.com/blog/dalvik-art-jit-aot)
549 |
550 | * **Baseline Profiles** - [Learn from here](https://outcomeschool.com/blog/dalvik-art-jit-aot)
551 |
552 | * **What is DEX?** - [Learn from here](https://developer.android.com/reference/dalvik/system/DexFile)
553 |
554 | * **What is Multidex in Android?** - [Learn from here](https://www.youtube.com/watch?v=R0zd8lmHnmE)
555 |
556 | * **Can you manually call the Garbage collector?** - [Is it possible to force Garbage Collection in Android?](https://www.youtube.com/watch?v=fPEjpFKo1-Q)
557 |
558 | #### Android Jetpack
559 |
560 | * **What is Android Jetpack and why to use this?**
561 |
562 | * **What is a ViewModel and how is it useful?** Learn: [What is a ViewModel and how is it useful?](https://youtu.be/ORtieK5f_zg)
563 |
564 | * **SharedViewModel in Android** Learn: [SharedViewModel in Android](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7262328327531577344-fwSE)
565 |
566 | * **What are Android Architecture Components?**
567 |
568 | * **StateFlow vs LiveData in Android Development** Learn: [StateFlow vs LiveData](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7316320147646885888-ZpyD)
569 |
570 | * **What is LiveData in Android?**
571 |
572 | * **How is LiveData different from ObservableField?**
573 |
574 | * **What is the difference between setValue and postValue in LiveData?** Learn: [setValue() vs postValue() in LiveData](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7274283452563107840-SXXl)
575 |
576 | * **How do you share ViewModel between Fragments in Android?** Learn: [SharedViewModel in Android](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7262328327531577344-fwSE)
577 |
578 | * **Explain WorkManager and its use cases.**
579 |
580 | * **Minimum repeat interval allowed when scheduling a PeriodicWorkRequest using WorkManager** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_androiddev-kotlin-activity-7314239540246810625-Xu0T)
581 |
582 | * **How Does WorkManager Guarantee Task Execution?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_how-does-workmanager-guarantee-task-execution-activity-7320301933691310080-GpCR)
583 |
584 | * **How does ViewModel work internally?**
585 |
586 | #### Others
587 |
588 | * **What is the difference between Serializable and Parcelable? Which is the best approach in Android?** - [Learn from here](https://outcomeschool.com/blog/parcelable-vs-serializable)
589 |
590 | * **Why Bundle class is used for data passing and why cannot we use simple Map data structure?** - [Learn from here](https://developer.android.com/guide/components/activities/parcelables-and-bundles)
591 |
592 | * **How do you troubleshoot a crashing application?** - [Learn from here](https://developer.android.com/topic/performance/vitals/crash)
593 |
594 | * **Explain the Android push notification system?** Learn from here: [How does the Android push notification system work?](https://youtu.be/810IFG2sWlc)
595 |
596 | * **What is AAPT?** - [Learn from here](https://developer.android.com/studio/command-line/aapt2)
597 |
598 | * **FlatBuffers vs JSON.**
599 |
600 | * **`HashMap`, `ArrayMap` and `SparseArray`** - [Learn from here](https://outcomeschool.com/blog/optimization-using-arraymap-and-sparsearray)
601 |
602 | * **What are Annotations?** - [Learn from here](https://outcomeschool.com/blog/creating-custom-annotations)
603 |
604 | * **How to create custom Annotation?** - [Learn from here](https://outcomeschool.com/blog/creating-custom-annotations)
605 |
606 | * **What is the Android Support Library? Why was it introduced?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_androiddev-activity-7275725268680392705-waUi)
607 |
608 | * **What is Android Data Binding?**
609 |
610 | ### Android Libraries
611 |
612 | Android Interview Questions and Answers:
613 |
614 | * **Explain OkHttp Interceptor** - [Learn from here](https://outcomeschool.com/blog/okhttp-interceptor)
615 |
616 | * **OkHttp - HTTP Caching** - [Learn from here](https://outcomeschool.com/blog/caching-with-okhttp-interceptor-and-retrofit)
617 |
618 | * **How to enable logging in OkHttp?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-androiddev-android-activity-7274652524433850368-qC4D)
619 |
620 | * **Why do we use the Dependency Injection Framework like Dagger in Android?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-activity-7038019147737276417-tH4s)
621 |
622 | * **Explain @ Inject, @ Module, @ Provides, @ Component Annotations in Dagger 2** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_androiddev-android-kotlin-activity-7318124163481628673-EAYM)
623 |
624 | * **How does the Dagger work?**
625 |
626 | * **How will you choose between Dagger 2 and Dagger-Hilt?**
627 |
628 | * **What is a Component in Dagger?**
629 |
630 | * **What is Module in Dagger?**
631 |
632 | * **How does the custom scope work in Dagger?**
633 |
634 | * **When to call dispose and clear on CompositeDisposable in RxJava?** - [Learn from here](https://outcomeschool.com/blog/dispose-vs-clear-compositedisposable-rxjava)
635 |
636 | * **What is Multipart Request in Networking?**
637 |
638 | * **What is Flow in Kotlin?** - [Learn from here](https://outcomeschool.com/blog/flow-api-in-kotlin)
639 |
640 | * **App Startup Library** - [Learn from here](https://outcomeschool.com/blog/app-startup-library)
641 |
642 | * **Tell me something about RxJava.**
643 |
644 | * **How will you handle error in RxJava?**
645 |
646 | * **FlatMap Vs Map Operator** - [Learn from here](https://outcomeschool.com/blog/rxjava-map-vs-flatmap)
647 |
648 | * **When to use `Create` operator and when to use `fromCallable` operator of RxJava?** - Learn from here: [RxJava Create and fromCallable Operator](https://outcomeschool.com/blog/rxjava-create-and-fromcallable-operator)
649 |
650 | * **When to use `defer` operator of RxJava?** - Learn from here: [RxJava Defer Operator](https://outcomeschool.com/blog/rxjava-defer-operator)
651 |
652 | * **How are Timer, Delay, and Interval operators used in RxJava?** - [Learn from here](https://outcomeschool.com/blog/rxjava-interval-operator)
653 |
654 | * **How to make two network calls in parallel using RxJava?** - [RxJava Zip Operator](https://outcomeschool.com/blog/rxjava-zip-operator)
655 |
656 | * **Tell the difference between Concat and Merge.** - [Learn from here](https://outcomeschool.com/blog/rxjava-concat-operator) and [here](https://outcomeschool.com/blog/rxjava-merge-operator)
657 |
658 | * **Explain Subject in RxJava?** - [Learn from here](https://outcomeschool.com/blog/rxjava-subject-publish-replay-behavior-async)
659 |
660 | * **What are the types of Observables in RxJava?** - Learn from here: [Types Of Observables In RxJava](https://outcomeschool.com/blog/types-of-observables-in-rxjava)
661 |
662 | * **How to implement search feature using RxJava in your application?** - Learn from here: [Instant Search Using RxJava Operators](https://outcomeschool.com/blog/instant-search-using-rxjava-operators)
663 |
664 | * **Pagination In RecyclerView Using RxJava Operators** - [Learn from here](https://outcomeschool.com/blog/pagination-in-recyclerview-using-rxjava-operators)
665 |
666 | * **How The Android Image Loading Library Glide and Fresco Works?** - [Learn from here](https://outcomeschool.com/blog/android-image-loading-library-optimize-memory-usage), [here](https://outcomeschool.com/blog/android-image-loading-library-use-bitmap-pool-for-responsive-ui) and [here](https://outcomeschool.com/blog/android-image-loading-library-solve-the-slow-loading-issue)
667 |
668 | * **Difference between Schedulers.io() and Schedulers.computation() in RxJava.**
669 |
670 | ### Android Architecture
671 |
672 | Android Interview Questions and Answers:
673 |
674 | * **Describe the architecture of your last app.**
675 |
676 | * **Describe MVVM.** - [MVVM Architecture](https://outcomeschool.com/blog/mvvm-architecture-android)
677 |
678 | * **MVC vs MVP vs MVVM architecture.**
679 |
680 | * **Clean Architecture** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-kotlin-activity-7123192186627571714-6143)
681 |
682 | * **MVI** - [MVI (Model-View-Intent) Architecture in Android](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineering-tech-activity-7288428333430644738-muDc)
683 |
684 | * **Software Architecture vs Software Design** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7230434583584858112-mMEG)
685 |
686 | * **Benefits of Multi-Module Architecture** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_androiddev-activity-7307324491402027008-BqC4)
687 |
688 | * **Multi-Module Project: Why and When?** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7317400201558663173-n-LA)
689 |
690 | ### Design Pattern
691 |
692 | Android Interview Questions and Answers
693 |
694 | * **Builder** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineer-tech-activity-7297905207080800256-sRuJ)
695 | * **Singleton**
696 | * **Factory** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7300164529571733505-MYfP)
697 | * **Observer** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7298657173910233089-3qzw)
698 | * **Repository**
699 | * **Adapter**
700 | * **Facade**
701 | * **Dependency Injection**
702 | * **Design Pattern used in Android** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7289501147243982848-hhym)
703 | * **Kotlin Optional Parameters vs Builder Pattern** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7270656113845370881-LDW8)
704 | * **Examples of the Observer pattern used in Android** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-activity-7288114509120970752-Z6c8)
705 | * **Design Pattern Used in Retrofit Library Source Code** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-opensource-activity-7289173219142516738-3sjB/)
706 | * **Design Pattern used in Glide (Image Loading Library)** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_androiddev-android-opensource-activity-7294335764249595904-6LSD)
707 |
708 | ### Android System Design
709 |
710 | Android Interview Questions and Answers:
711 |
712 | Refer to this blog: [**Android System Design Interviews**](https://outcomeschool.com/blog/android-system-design-interviews)
713 |
714 | * **Design an Image Loading Library** - [Learn from here](https://outcomeschool.com/blog/android-image-loading-library-optimize-memory-usage), [here](https://outcomeschool.com/blog/android-image-loading-library-use-bitmap-pool-for-responsive-ui) and [here](https://outcomeschool.com/blog/android-image-loading-library-solve-the-slow-loading-issue)
715 |
716 | * **Design File Downloader Library** - [Learn from here](https://github.com/amitshekhariitbhu/PRDownloader)
717 |
718 | * **Design WhatsApp**
719 |
720 | * **Design Instagram Stories**
721 |
722 | * **Design Networking Library**
723 |
724 | * **Design Facebook Near-By Friends App**
725 |
726 | * **Design Caching Library.**
727 |
728 | * **Design problems based on location-based app**
729 |
730 | * **How to build an offline-first app? Explain the architecture**
731 |
732 | * **Design LRU Cache**
733 |
734 | * **Design Analytics Library**
735 |
736 | * **HTTP Request vs HTTP Long-Polling vs WebSocket vs Server-Sent Events** - [Learn from blog](https://outcomeschool.com/blog/http-request-long-polling-websocket-sse) and [Video - HTTP Request vs HTTP Long-Polling vs WebSocket vs Server-Sent Events](https://www.youtube.com/watch?v=8ksWRX4xV-s)
737 |
738 | * **How do Voice And Video Call Work?** - [Learn from here](https://outcomeschool.com/blog/voice-and-video-call)
739 |
740 | * **Design Uber App** - [Learn from here](https://github.com/amitshekhariitbhu/ridesharing-uber-lyft-app)
741 |
742 | * **Database Normalization vs Denormalization** - [Database Normalization vs Denormalization](https://outcomeschool.com/blog/database-normalization-vs-denormalization)
743 |
744 | * **Hash vs Encrypt vs Encode** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineering-activity-7227173077665660929--KD8)
745 |
746 | * **Webhook vs Polling** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_softwareengineer-activity-7265962230553223168-fsPx)
747 |
748 | * **Options for real-time updates in an Android App** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-android-activity-7287460425212866560-dJNB)
749 |
750 | * **Options for Network Optimization in a Mobile App** - [Options for Network Optimization in a Mobile App](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7287470994447900672-XYM9)
751 |
752 | * **Firebase Remote Config in Android** - [Firebase Remote Config in Android](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7288408601944043520-pHZX)
753 |
754 | * **Accurate time in Android** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7298341712634990592-tgyR)
755 |
756 | * **Query Optimization in SQLite for Better Performance** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7299289876846284801-3gfH)
757 |
758 | * **WebSocket vs Socket.IO** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineer-tech-activity-7305902742537916416-C5b9)
759 |
760 | * **Symmetric vs Asymmetric Encryption** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_symmetric-vs-asymmetric-encryption-activity-7308873320894996481-a43E)
761 |
762 | * **SMS Retriever API in Android** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_sms-retriever-api-in-android-activity-7309171578796224513-YRab)
763 |
764 | ### Android Unit Testing
765 |
766 | Android Interview Questions and Answers:
767 |
768 | * **Unit Testing ViewModel with Kotlin Coroutines and LiveData** - [Learn from here](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-coroutines-and-livedata)
769 |
770 | * **Unit Testing ViewModel with Kotlin Flow and StateFlow** - [Learn from here](https://outcomeschool.com/blog/unit-testing-viewmodel-with-kotlin-flow-and-stateflow)
771 |
772 | * **What is Espresso?** - [Learn from here](https://developer.android.com/training/testing/espresso/basics)
773 |
774 | * **What is Robolectric?** - [Learn from here](http://robolectric.org/)
775 |
776 | * **What are the disadvantages of using Robolectric?** - [Learn from here](https://stackoverflow.com/questions/18271474/robolectric-vs-android-test-framework)
777 |
778 | * **What is UI-Automator?** - [Learn from here](https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html)
779 |
780 | * **Explain the unit test.** - [Learn from here](https://developer.android.com/training/testing/unit-testing/local-unit-tests)
781 |
782 | * **Explain instrumented test.** - [Learn from here](https://developer.android.com/training/testing/unit-testing/instrumented-unit-tests)
783 |
784 | * **Why Mockito is used?** - [Learn from here](http://site.mockito.org/)
785 |
786 | * **Describe code coverage.** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7298564060105609217-8zXA)
787 |
788 | ### Android Tools And Technologies
789 |
790 | Android Interview Questions and Answers:
791 |
792 | * **CI/CD Pipeline for Android** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7294600775178063872-Q0oY/)
793 |
794 | * **What is ADB?** - [Learn from here](https://developer.android.com/studio/command-line/adb)
795 |
796 | * **What is the StrictMode?** - Learn from here: [StrictMode](https://outcomeschool.com/blog/strictmode-in-android-development)
797 |
798 | * **What is Lint? What is it used for?**
799 |
800 | * **Android App Release Checklist For The Production Launch** - Learn from here: [Android App Release Checklist For The Production Launch](https://www.linkedin.com/posts/amit-shekhar-iitbhu_androiddev-android-activity-7275029928692080640-HIhx)
801 |
802 | * **Git.**
803 |
804 | * **Firebase.** - [Learn from here](https://firebase.google.com/)
805 |
806 | * **How to measure method execution time in Android?**
807 |
808 | * **Can you access your database of SQLite Database for debugging?** - [Learn from here](https://github.com/amitshekhariitbhu/Android-Debug-Database)
809 |
810 | * **What are things that we need to take care while using Proguard?**
811 |
812 | * **How to use Android Studio Memory Profiler?**
813 |
814 | * **What is Kotlin DSL for Gradle?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7282624364695404546-BvbS)
815 |
816 | * **implementation vs api in Gradle** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7287325379441082368-_P9m)
817 |
818 | * **What is Gradle?**
819 |
820 | * **Gradle related files in Android Project** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7292045394778148864-mFVf)
821 |
822 | * **How do you create a custom task in Gradle?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7282991795133685760-uUxE/)
823 |
824 | * **annotationProcessor, kapt, ksp in Gradle** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7296566489803866112-DnT8)
825 |
826 | * **Build Variants in Android** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7298197111030824962-6vW0)
827 |
828 | * **APK Size Reduction.**
829 |
830 | * **How can you speed up the Gradle build?**
831 |
832 | * **About gradle build system.**
833 |
834 | * **About multiple apk for Android Apps.**
835 |
836 | * **What is ProGuard used for?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-activity-7218840466283220993-afVr)
837 |
838 | * **What is proguard-rules.pro file used for?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineer-tech-activity-7300763237942181888-P_jL)
839 |
840 | * **What is obfuscation? What is it used for? What about minification?**
841 |
842 | * **How to change some parameters in an app without app update?** - [Firebase Remote Config in Android](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7288408601944043520-pHZX)
843 |
844 | * **What is Write-Ahead Logging (WAL) and why it is used internally in databases?** - [Learn from here](https://outcomeschool.com/blog/write-ahead-logging)
845 |
846 | ### Java
847 |
848 | Android Interview Questions and Answers:
849 |
850 | #### Solid Principles
851 |
852 | * **“S” in SOLID Principles: The Single Responsibility Principle** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7234425076308164611-sY57)
853 | * **"O" in SOLID Principles: Open/Closed Principle** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7287026079851061248-bjdM)
854 | * **“L” in SOLID Principles: Liskov Substitution Principle (LSP)** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineering-tech-activity-7300845161725448193-iCnO)
855 | * **“I” in SOLID Principles: Interface Segregation Principle (ISP)** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7301459048292397056--9bL)
856 | * **“D” in SOLID Principles: Dependency Inversion Principle (DIP)** - [Learn from here](https://www.linkedin.com/posts/outcomeschool_outcomeschool-softwareengineer-tech-activity-7303987022493270016-VrZL)
857 |
858 | #### OOP
859 |
860 | * **Explain OOP Concepts.**
861 |
862 | * **Differences between abstract classes and interfaces?**
863 | - An abstract class, is a class that contains both concrete and abstract methods
864 | (methods without implementations). An abstract method must be implemented by the abstract class
865 | sub-classes. Abstract classes cannot be instantiated and need to be extended to be used.
866 | - An interface is like a blueprint/contract of a class (or it may be thought of as a class with methods, but without their implementation). It contains empty methods that
867 | represent, what all of its subclasses should have in common. The subclasses provide the
868 | implementation for each of these methods. Interfaces are implemented.
869 |
870 | * **Difference between method overloading and overriding.**
871 |
872 | * **What are the access modifiers you know? What does each one do?**
873 | - There are four access modifiers in Java language (from strictest to the most lenient):
874 | 1. `private` *variables*, *methods*, *constructors* or *inner classes* are only visible to its' containing class and its' methods. This modifier is most commonly used, for example, to allow variable access only through getters and setters or to hide underlying implementation of classes that should not be used by user and therefore maintain encapsulation. Singleton constructor is also marked `private` to avoid unwanted instantiation from outside.
875 | 2. `Default` (no keyword is used) this modifier can be applied to *classes*, *variables*, *constructors* and *methods* and allows access from classes and methods inside the same package.
876 | 3. `protected` can be used on *variables*, *methods* and *constructors* therefore allowing access only to subclasses and classes that are inside the same package as protected members' class.
877 | 4. `public` modifier is widely-used on *classes*, *variables*, *constructors* and *methods* to grant access from any class and method anywhere. It should not be used everywhere as it implies that data marked with `public` is not sensitive and can not be used to harm the program.
878 |
879 | * **Can an Interface implement another Interface?**
880 | - Yes, an interface can implement another interface (and more than one), but it needs to use `extends`, rather than `implements` keyword. And while you can not remove methods from parent interface, you can add new ones freely to your sub-interface.
881 |
882 | * **What is Polymorphism? What about Inheritance?**
883 |
884 | #### Collections and Generics
885 |
886 | * **Arrays Vs ArrayLists** - [Learn from here](https://stackoverflow.com/questions/32020000/what-is-the-difference-between-an-array-arraylist-and-a-list/32020072)
887 |
888 | * **HashSet Vs TreeSet** - [Learn from here](https://stackoverflow.com/questions/25602382/java-hashset-vs-treeset-when-should-i-use-over-other)
889 |
890 | * **HashMap Vs Set** - [Learn from here](https://stackoverflow.com/questions/2773824/difference-between-hashset-and-hashmap)
891 |
892 | * **Explain Generics in Java?**
893 |
894 | #### Objects and Primitives
895 |
896 | * **How is `String` class implemented? Why was it made immutable?**
897 | - There is no primitive variant of `String` class in Java language - all strings are just wrappers around underlying array of characters, which is declared `final`. This means that, once a `String` object is instantiated, it cannot be changed through normal tools of the language (Reflection still can mess things up horribly, because in Java no object is truly immutable). This is why `String` variables in classes are the first candidates to be used, when you want to override `hashCode()` and `equals()` of your class - you can be sure, that all their required contracts will be satisfied.
898 | > Note: The String class is immutable, so that once it is created a String object cannot be changed. The String class has a number of methods, some of which will be discussed below, that appear to modify strings. Since strings are immutable, what these methods really do is create and return a new string that contains the result of the operation. ([Official Java Documentation](https://docs.oracle.com/javase/tutorial/java/data/strings.html))
899 |
900 | This class is also unique in a sense, that, when you create an instance like this:
901 | ```java
902 | String helloWorld = "Hello, World!";
903 | ```
904 | `"Hello, World!"` is called a *literal* and compiler creates a `String` object with its' value. So
905 | ```java
906 | String capital = "Hello, World!".toUpperCase();
907 | ```
908 | is a valid statement, that, firstly, will create an object with literal value "Hello, World!" and then will create and return another object with value "HELLO, WORLD!"
909 | - `String` was made immutable to prevent malicious manipulation of data, when, for example, user login or other sensitive data is being send to a server.
910 |
911 | * **What does it means to say that a `String` is immutable?**
912 | - It means that once created, `String` object's `char[]` (its' containing value) is declared `final` and, therefore, it can not be changed during runtime.
913 |
914 | * **Can you list 8 primitive types in java?**
915 | - `byte`
916 | - `short`
917 | - `int`
918 | - `long`
919 | - `float`
920 | - `double`
921 | - `char`
922 | - `boolean`
923 |
924 | * **What is the difference between an Integer and int?**
925 | - `int` is a primitive data type (with `boolean`, `byte`, `char`, `short`, `long`, `float` and `double`), while `Integer` (with `Boolean`, `Byte`, `Character`, `Short`,`Long`, `Float` and `Double`) is a [wrapper](https://docs.oracle.com/javase/tutorial/java/data/numberclasses.html) class that encapsulates primitive data type, while providing useful methods to perform different tasks with it.
926 |
927 | * **Do objects get passed by reference or value in Java? Elaborate on that.**
928 |
929 | #### Java Memory Model and Garbage Collector
930 |
931 | * **What is garbage collector? How does it work?** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_java-tech-softwareengineer-activity-7308111597581799425-qZN0/)
932 |
933 | #### Concurrency
934 |
935 | * **What does the keyword `synchronized` mean?**
936 |
937 | * **What is a `ThreadPoolExecutor`?** - [ThreadPoolExecutor in Android](https://outcomeschool.com/blog/threadpoolexecutor-in-android)
938 |
939 | * **What is `volatile` modifier?**
940 |
941 | * **Object Level Lock vs Class Level Lock in Java** - [Learn from here](https://x.com/amitiitbhu/status/1818156936413778332)
942 |
943 | * **Concurrency vs Parallelism** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineering-activity-7226208648115404801-u8uu)
944 |
945 | * **The classes in the atomic package expose a common set of methods: `get`, `set,`, `lazyset`, `compareAndSet`, and `weakCompareAndSet`. Please describe them.**
946 |
947 | #### Exceptions
948 |
949 | * **How does the `try{}`, `catch{}`, `finally` works?**
950 |
951 | * **What is the difference between a `Checked Exception` and an `Un-Checked Exception`?**
952 |
953 | #### Others
954 |
955 | * **Shallow vs. Deep Copy in Java** - [Learn from here](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineering-activity-7224635014641016834-j8X1)
956 |
957 | * **Explain Serialization and Deserialization** - [Learn from here](https://www.linkedin.com/posts/pallavi-shekhar_outcomeschool-softwareengineering-tech-activity-7228977637916823552-Bo2N)
958 |
959 | * **What is serialization? How do you implement it?**
960 |
961 | * **What is `transient` modifier?**
962 |
963 | * **What are anonymous classes?**
964 |
965 | * **What is the difference between using `==` and `.equals` on an object?**
966 |
967 | * **What is the `hashCode()` and `equals()` used for?**
968 |
969 | * **When would you make an object value `final`?**
970 |
971 | * **What are these `final`, `finally` and `finalize` keywords?**
972 |
973 | * **What is the difference between "throw" and "throws" keyword in Java?**
974 | - `throws` is just used to indicated which exception is to be thrown. But the `throw` keyword is used to throw some exception from any static block or any method.
975 |
976 | * **What does the `static` word mean in Java?**
977 | - In case of `static` variable it means that this variable (its' value or the object it references) spans across all instances of enclosing class (changing it in one instance affects all others), while in case of `static` methods it means that these methods can be invoked without an instance of their enclosing class. It is useful, for example, when you create util classes that need not be instantiated every time you want to use them.
978 |
979 | * **Can a `static` method be overridden in Java?**
980 | - While child class can override a static method with another static method with the same signature (return type can be down-casted), it is not truly overridden - it becomes "hidden", but both methods can still be accessed under right circumstances (see question about overloading/overriding above).
981 |
982 | * **When is a `static` block run?**
983 | - Code inside static block is executed only once: the first time you make an object of that class or the first time you access a static member of that class (even if you never make an object of that class).
984 |
985 | * **Explain Reflection in Java** - [Learn from here](https://x.com/amitiitbhu/status/1819234916812341567)
986 |
987 | * **What is Dependency Injection?**
988 |
989 | * **Difference between `StringBuffer` and `StringBuilder`?** - [Learn from here](https://outcomeschool.com/blog/string-vs-stringbuffer-vs-stringbuilder)
990 |
991 | * **What is the difference between fail-fast and fail-safe iterators in Java?**
992 |
993 | * **Monitor and Synchronization**
994 |
995 | ### Jetpack Compose
996 |
997 | Topics you should know in **Jetpack Compose** for Android Interview:
998 |
999 | * Compose
1000 | * State: remember, rememberSaveable, MutableState
1001 | * Recomposition
1002 | * State hoisting
1003 | * Side-effects
1004 | * Modifier
1005 | * Theme
1006 | * Layout, List
1007 | * Gestures, Animation
1008 | * CompositionLocal
1009 |
1010 | Learn the above-mentioned from the following links:
1011 |
1012 | - [Getting Started with Compose](https://developer.android.com/jetpack/compose/tutorial)
1013 | - [Thinking in Compose](https://developer.android.com/jetpack/compose/mental-model)
1014 | - [State](https://developer.android.com/jetpack/compose/state)
1015 | - [remember vs rememberSaveable](https://outcomeschool.com/blog/remember-vs-remembersaveable)
1016 | - [Lifecycle](https://developer.android.com/jetpack/compose/lifecycle)
1017 | - [Modifiers](https://developer.android.com/jetpack/compose/modifiers)
1018 | - [Side-effects](https://developer.android.com/jetpack/compose/side-effects)
1019 | - [Phases](https://developer.android.com/jetpack/compose/phases)
1020 | - [Semantics](https://developer.android.com/jetpack/compose/semantics)
1021 | - [CompositionLocal](https://developer.android.com/jetpack/compose/compositionlocal)
1022 | - [Can we use traditional Android Views and Compose together?](https://www.linkedin.com/posts/amit-shekhar-iitbhu_outcomeschool-softwareengineering-tech-activity-7235142707138961408-40hQ)
1023 |
1024 | Questions
1025 |
1026 | * **Jetpack Compose vs Android View System**
1027 |
1028 | * **Explain the concept of declarative UI in Jetpack Compose.**
1029 |
1030 | * **Declarative UI vs Imperative UI**
1031 |
1032 | * **What are Composable functions?**
1033 |
1034 | * **What is Recomposition?**
1035 |
1036 | * **What is State in Compose?**
1037 |
1038 | * **How does state management work in Jetpack Compose?**
1039 |
1040 | * **Stateful composable vs Stateless composable**
1041 |
1042 | * **What are the side effects?**
1043 |
1044 | * **Difference between LaunchedEffect and DisposableEffect**.
1045 |
1046 | * **What is rememberCoroutineScope and its use cases?**
1047 |
1048 | * **How to observe Flows, and LiveData states in Compose UI?**
1049 |
1050 | * **How can we handle asynchronous operations in Jetpack Compose?**
1051 |
1052 | * **How can we convert a non-compose state into a Compose state?**
1053 |
1054 | * **Explain derivedStateOf.**
1055 |
1056 | * **Explain rememberUpdatedState.**
1057 |
1058 | * **Difference between remember and rememberSaveable.** - [Learn from here](https://outcomeschool.com/blog/remember-vs-remembersaveable)
1059 |
1060 | * **Explain the Lifecycle of a Composable in Jetpack Compose.**
1061 |
1062 | * **How do you handle lifecycle events in Compose functions?**
1063 |
1064 | * **What are the best practices for performance optimization in Jetpack Compose?**
1065 |
1066 | * **Can we use both Jetpack Compose and Android View in a Single App?**
1067 |
1068 | * **What is State Hoisting?**
1069 |
1070 | * **Explain CompositionLocal**
1071 |
1072 | * **Explain Jetpack Compose Phases.**
1073 |
1074 | * **What is the role of the Modifier in Jetpack Compose?**
1075 |
1076 | * **What are Semantics?**
1077 |
1078 | * **How can you handle user input and events in Jetpack Compose?**
1079 |
1080 | * **How do you handle navigation in Jetpack Compose?**
1081 |
1082 | * **How do you handle orientation changes in Jetpack Compose?**
1083 |
1084 | * **Explain the concept of unidirectional data flow in Jetpack Compose.**
1085 |
1086 | * **How to create Custom Layouts in Compose?**
1087 |
1088 | ### Other Topics
1089 |
1090 | Android Interview Questions and Answers:
1091 |
1092 | * **Describe SQLite.**
1093 |
1094 | * **Have you used Room?**
1095 |
1096 | * **Can we identify the users who have uninstalled our application?**
1097 |
1098 | * **Android Development Best Practices.** - Learn from here: [Android Development Best Practices](https://outcomeschool.com/blog/android-development-best-practices)
1099 |
1100 | * **React Native vs Flutter** - Learn from here: [React Native vs Flutter](https://outcomeschool.com/blog/react-native-vs-flutter)
1101 |
1102 | * **What are the metrics that you should measure continuously while android application development?** - Learn from here: [Android App Performance Metrics](https://outcomeschool.com/blog/android-app-performance-metrics)
1103 |
1104 | * **How to avoid API keys from check-in into VCS?**
1105 |
1106 | * **How does the Kotlin Multiplatform work?** - [Blog](https://outcomeschool.com/blog/how-does-the-kotlin-multiplatform-work)
1107 |
1108 | * **How to use Memory Heap Dumps data?**
1109 |
1110 | * **How to implement Dark Theme in your app?**
1111 |
1112 | * **How to secure the API keys used in an Android App?**
1113 |
1114 | * **What is Cleartext traffic?** Learn from here: [What is Cleartext traffic?](https://www.linkedin.com/posts/amit-shekhar-iitbhu_softwareengineer-androiddev-android-activity-7281879316601126913-x1az)
1115 |
1116 | * **Tell something about memory usage in Android.**
1117 |
1118 | * **Explain Annotation processing.**
1119 |
1120 | * **How does the Android Push Notification system work?** Learn from here: [How does the Android Push Notification system work?](https://youtu.be/810IFG2sWlc)
1121 |
1122 | * **Android Push Notification Flow using FCM.** Learn from here: [Android Push Notification Flow using FCM](https://www.youtube.com/watch?v=TrufwW4ILHg)
1123 |
1124 | * **How to show local Notification at an exact time?**
1125 |
1126 | ### Data Structures and Algorithms
1127 |
1128 | * **Android Developer should know these Data Structures for Next Interview** - [Check here](https://outcomeschool.com/blog/android-developer-should-know-these-data-structures-for-next-interview)
1129 |
1130 | ### High-quality videos to prepare for Android Interview - [Amit Shekhar YouTube Channel](https://www.youtube.com/@amitshekhar)
1131 |
1132 | ### High-quality blogs to prepare for Android Interview - [Check here - Outcome School Blog](https://outcomeschool.com/blog)
1133 |
1134 | ### Prepare for Machine Learning Interview: [Machine Learning Interview Questions](https://github.com/amitshekhariitbhu/machine-learning-interview-questions)
1135 |
1136 | ### Found this project useful :heart:
1137 |
1138 | * Support by clicking the :star: button on the upper right of this page. :v:
1139 |
1140 | You can connect with me on:
1141 |
1142 | - [Twitter](https://twitter.com/amitiitbhu)
1143 | - [YouTube](https://www.youtube.com/@amitshekhar)
1144 | - [LinkedIn](https://www.linkedin.com/in/amit-shekhar-iitbhu)
1145 | - [GitHub](https://github.com/amitshekhariitbhu)
1146 |
1147 | ### License
1148 | ```
1149 | Copyright (C) 2024 Amit Shekhar
1150 |
1151 | Licensed under the Apache License, Version 2.0 (the "License");
1152 | you may not use this file except in compliance with the License.
1153 | You may obtain a copy of the License at
1154 |
1155 | http://www.apache.org/licenses/LICENSE-2.0
1156 |
1157 | Unless required by applicable law or agreed to in writing, software
1158 | distributed under the License is distributed on an "AS IS" BASIS,
1159 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1160 | See the License for the specific language governing permissions and
1161 | limitations under the License.
1162 | ```
1163 |
--------------------------------------------------------------------------------
/Success.java:
--------------------------------------------------------------------------------
1 | public class Success{
2 |
3 | public static void main(String []args){
4 | System.out.println("Interviews are tough, so are you :)");
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Success.kt:
--------------------------------------------------------------------------------
1 | object Success {
2 | @JvmStatic fun main(args:Array) {
3 | println("Interviews are tough, so are you :)")
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/assets/banner-android-interview-questions.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/amitshekhariitbhu/android-interview-questions/954080bfdb1901379b6d55351e1d876f2a523e53/assets/banner-android-interview-questions.jpg
--------------------------------------------------------------------------------