Most Asked Android Interview Questions In 2022 - Your Guide For Android Interview Preparation
Prepared and maintained by Rahnuma Sharib who is having experience of taking interviews of many Android developers.
Hi, I am Rahnuma Sharib, I have mentored many developers, and their efforts landed them high-paying tech jobs. I am passionate about sharing knowledge through open-source, blogs, and videos.
-
When I am in my activity get a phone call what will be the lifecycle of the activity
-
When I am in my activity get a phone call what will be the lifecycle of the fragment inside my activity
-
Fragment, activity and application life cycle and when there life cycle method get trigger.
-
Difference between fragment or activity
-
What is fragment.
-
What happen when we press back button on activity A.
-
Which activity life cycle method trigger when orientation change.
-
When onDistroy will get called before onPause or onStop.
-
Type of services in Android
-
What do you think about NavHost in navigation
-
What are SOLID principles?
-
What is broadcast receiver and content provider and how can we implement it.
-
Advantage of using recycle view over list and grid view.
-
Launch mode and there type and differences.
-
Data binding and its type.
-
How to pass data from activity to fragment or fragment to fragment.
-
Difference between adding or replacing a fragment.
-
What is Intent and its type
-
Constraint layout and its advantage
-
Difference between push value and set value ( Live Data )
-
Advantage of using live data
-
What is Dex file.
-
Which database you use and why
-
Benefit of using Room database
-
Difference between room and sqlite.
-
Difference between service and thread.
-
What's is concurrency.
-
How to improve app performance.
-
What is memory leak and how to avoid it.
-
How to go back on previous fragment when click on back button.
-
How to communicate between service and activity.
-
What is concurrency.
-
On which thread service run and how can we change the thread.
-
Job intent service and its purpose
-
How to improve application performance.
-
What is memory leak and how to solve it.
-
How service will communicate with activity.
-
What is job scheduler and its work.
-
Parameter constructer and non parameter constructer are good and why in fragment.
-
What are the benefits of Kotlin over Java
-
Explain the use of lateinit & lazy keywords
-
How to check lateinit class is initialize or not.
-
What is null safety in Kotlin?
-
What is the diff between Var & Val and const and val
-
What is Elvis operator?
-
What is Flow API in Kotlin
-
Explain coroutines in kotlin
-
What are scoped functions and there use in kotlin
-
What is singleton class and how can you declare it?
-
what is the diff between companion obj & object
-
Used extension functions? example
-
Data class and how its different from other classes.
-
Sealed class.
-
What is suspend function.
-
what is the diff between static & singleton Explain @jvmstatic @jvmoverloads @jvmfiled
-
Difference between volatile and syncronized.
-
Live data, Mutable live data and Mediator live data
-
Advantage of live data
-
What is flow , state flow and shared flow
-
Extension, inline, inflix and high order function and there benefit in term of memory.
-
Difference between public ( visiblity modifier ) and open keyword
-
Difference between volatile and synchronized.
-
Arraymap and hashmap.
-
How hashmap work in background.
-
What is referential equality and structal equality.
-
Will reference of two data class with same set of data will it be equal or not?
-
What is the diff between encapsulation & abstraction give practical example
-
Explain OOP Concepts.
-
Will reference of two data class with same set of data will it be equal or not?
-
When to use array & Array List
-
What is the volatile keyword
-
What is the transient keyword
-
What is a diff between a string buffer & string builder
-
Why is string immutable
-
What is the diff between encapsulation & abstraction (practical example)
-
class A -> extends class B, implements interface C. Both have the same method fun add() {}, Which one will be implemented in class A? Try yourself
-
What is the difference between String test = new String(“X”) & String test = “X”. Explain String constant pool & String literal
-
What is coroutines.
-
What is coroutines dispatchers there type and work.
-
What is coroutines scope and its type.
-
What is coroutines context.
-
What is coroutines builder, its type and there work.
-
Difference between launch and async.
-
What is ViewModel and its advantage.
-
How to instantiate viewmodel.
-
What is the difference between ViewModel and AndroidViewModel.
-
How ViewModel work internally.
-
How ViewModel retain data during configuration change.
-
During configuration change activity distroy and re-create then how view-model instance remain same.
-
What is view-model factory & how to pass data in view model constructor
-
Difference between shared view model and view model.
-
What is Dependency Injection and its benefit.
-
Where should we write code of DI.
-
How hilt provide required object should we write it.
-
What is MVVM, and how does it work and its advantage.
-
what is the diff between MVP/MVC & MVVM
-
Which one you prefer to use and why?
-
advantage of using retrofit.
-
what is Marge and rebase in git.
-
how you create branch and work on them .
-
What are the benefits of using Jetpack compose?
-
What is a Composable function?
-
What is a declarative approach?
-
What jetpack compose libraries have you used?
-
Explain compose UI basic components
-
In Unit testing, what is @Before & @Beforeclass annotation used for
-
Why should we use a Mockito lib?
-
Explain Unit & Instrumentation tests
-
What is Queue, Stack and Array.
-
The time complexity of Hash Table — O(1).
-
Best for getting the last item — Stack
-
Time Complexity of Binary Search — O(log N)
-
Which is best Sorting Algo — Quick Sort
-
Best performance for finding minimum value — Array
That’s a wrap for now! Many more to come I hope you find this blog helpful.
- Support by clicking the ⭐ button on the upper right of this page. ✌️
Copyright (C) 2022 Rahnuma Sharib
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Just make pull request. You are in!