Android Interview Questions 2022

JAVA

  • Why String is mutable?
  • String str1 = 10

                String str2 = 20

        str1 == str2 is this true?

  • What String Pool in java?
  • Difference of StringBuffer vs String?
  • Difference of StringBuilder vs StringBuffer?
  • What is HashMap and purpose?
  • Difference of HashMap vs HashTable?
  • Difference of HashMap vs HashSet?
  • What is array vs list?
  • What is abstract class in java?
  • What is collections in java?
  • What is flatmap?
  • What is array vs arraylist?
  • What is Interface in Java?
  • What is polymorphism ?
  • What is singleton class?
  • The following variable stored in which memory?

                String str = new String()  - memory?

        String str = “test”;

        String str1 = “test”;            - memory?

  • Difference of == and equals() method in java?
  • Program: Segregate the 01 int array [0100110100] to [0000001111]
  • Write a program for fibno series?
  • Write a program for palindrom? Eg: 121, madam
  • Write a program input [12345678] to output [76812345]
  • Write a program for vowels from given string?
  • Write a program: Get duplicate data count from given int array [122333344455]

KOTLIN

  • Singleton class in kotlin?
  • What is scope functions in kotlin?
  • str?.let() - is this working?
  • Which operator used for null check? !!
  • What is companion object?
  • Difference of companion object and @JvmStatic keyword in kotlin?
  • What is @JvmStatic, @JvmOverload, @JvmField, @JvmClass
  • What is lateinit vs lazy?
  • What is data class?
  • Data class is open class?
  • What are the classes in kotlin?
  • Every class is in kotlin can inheritable?
  • Difference of sealed class and enum class?
  • What are the null safe operators in kotlin?
  • What is difference between java and kotlin?
  • Advantages of kotlin in android?
  • Which version officially announce for android app development?
  • What is Notnull variable in kotlin?
  • What is primary constructor in kotlin?
  • How to communicate between primary and secondary constructor?
  • Difference between primary and secondary constructors in kotlin?
  • What are the scopes in kotlin?
  • Difference of GlobalScope and CoroutineScope and ViewModeScope?
  • What is launch, async?
  • What is the difference of launch, async and withContent() in kotlin?
  • Write foreach in kotlin?
  • Difference of == and === in kotlin?

ANDROID

  • What is aar and apk?
  • What is activity?
  • What is service?
  • What is stickyBroadcast?
  • What is pending Intent?
  • What is broadcast receiver?
  • What is content provider?
  • What is coroutine?
  • What is suspend method and purpose?
  • What are the lifecycle methods in Activity?
  • What is different between onCreate() and onRestart()?
  • What are the lifecycle methods in Fragment?

onattache, oncreate, oncreateview, onviewcreated, onviewstaterestored, onstart, onresume, onpause, onstop, onsaveinstancestate, ondestroyview, ondestroy, ondetach

  • What is the difference between add/replace in a fragment?
  • What are the lifecycle methods in Service?

oncreate(), onstartcommand(), onbind(), onrebind(), onunbind(), ondestroy()

  • How to stop the service?

stopService(Intent) and stopSelf() methods used to stop the service

  • Difference between Service and Intent Service?
  • What is JobSchedule and purpose?
  • What is Foreground service and purpose?
  • What is MVVM?
  • Explain the Difference of MVP and MVVM?
  • How to share the data between activities?
  • What is difference of list view and recyclerView?
  • Advantages of recycler View?
  • What are the permission states is in android?

- Normal permission

                -internet, bluetooth, networkstate, networkchange, wifi change

        - Danger permission

                - camera, microphone, sms, call, storage, location, gps, contact

        - Signature permission

                - write setting, write voice mail, read voice mail

        - Special permission

                - system_alarm_window

  • What are the main components in android?
  • What is the broadcast receiver and purpose?
  • What is a content provider?
  • How to share the data between the two services?
  • Broadcast receiver will be register and deregister in which activity lifecycle?
  • onStart() and onStop()
  • What is databinding?
  • Difference of viewBinding and databinding in android?
  • What is fragmentContainerView?
  • Advantages of recyclerView in android?
  • Difference between listview and recyclerview?
  • What is local broadcast manager?
  • What is serializable and parcelable?
  • What is Thread, Handler and asynctask?
  • What is the difference of WorkManager vs CoroutineWorker?
  • What is synchronous?
  • Difference of Sqlite and Room?
  • What is @Volatile?
  • What is flow in android kotlin?
  • What is paging and purpose?
  • What is jetpack component in android?
  • Purpose of Faculty ViewModel in android?
  • What is lifecycle observer?
  • What is live data in android?
  • Difference of live data and state flow?
  • What is rxjava?
  • What is jetpack compose?
  • Difference types of dispatchers?
  • Purpose of onrestore instance state in fragment lifecycle?
  • What is hilt in android?
  • What is solid principles?
  • What is launch mode in android?
  • Difference of SingleTop and SingleInstance in android?
  • How to handle the data in android?
  • What is stickyIntent?
  • What is sharedviewmodel in android?
  • What is observable?
  • What is the difference between constraint layout and coordinate layout ?
  • How does the FCM push notification work ?
  • What is Intent and its types ?
  • Is storing values in shared preferences temporarily or permanent ?
  • For e.g. : If there is a splash screen, login screen and home page. And after closing the app and opening again how to go home page from splash page directly Explain ?
  • What are the components in Dagger2 ?
  • What is the use of Inject and Provided in Dagger2 ?
  • What is the architecture modal you are using in android and explain how it works?
  • In Sqlite when does the OnUpdate call actually ? And how does it know when to call OnUpdate ?
  • How to pass data from fragment to its base activity ?
  • What is a singleton and its use ?
  • What is the use of view holder? And why do we go for it ?
  • Have you used any of the latest component in android jetpack ?
  • What is Appcompat and Contextcompat ? Why do we \use them ? What is the difference between the two ?
  • In what format the data is being stored in shared preferences ?
  • What are the issues faced in 8.0 in some devices for push notifications ? Ans: We need to use Notification Channel for that.
  • How to do face recognition ?
  • How to pass objects between two activities ?
  • What is a static block ?
  • What are all the dependency you have used ?
  • What is a design pattern ?
  • What is gradle and maven ? What language is used ?
  • If task is running in doInBackground in Async Task and if screen is rotated to Async Task calls again . Then what happens to previous running task ? will it get stopped ? Crash ? How to avoid this scenario.
  • If battery low alert shows what happens to the current running app ? Will it get stopped or destroyed ?
  • How many builds can you generate ? Ans : Debug, Release and Custom.

Comments

Popular posts from this blog

Google Assistant Implementation in Android application with app actions