Android

Android Interview Questions and Answers

Updated 7 Oct 2024
search-icon

Q1. Why data class require at least one parameter in primary construction?

Ans.

Data class requires at least one parameter in primary constructor to ensure each instance of the class is unique.

  • Primary constructor parameters are used to initialize properties in data class.

  • Data classes are designed to hold data, so having at least one parameter ensures uniqueness of instances.

  • Without parameters, instances of data class would be identical and defeat the purpose of data class.

Q2. How view model works under the hood?

Ans.

View model in Android is a class that stores and manages UI-related data in a lifecycle-conscious way.

  • View model survives configuration changes and is not destroyed when the UI is destroyed.

  • It is used to separate the UI controller logic from the UI layout.

  • View model is typically used with LiveData to update the UI when the data changes.

  • It helps in organizing and handling data for the UI efficiently.

Q3. Explain about android architecture Oops concept of Java

Ans.

Android architecture consists of four layers: Linux kernel, native libraries, Android runtime, and application framework. OOP concepts in Java include inheritance, polymorphism, encapsulation, and abstraction.

  • Android architecture includes Linux kernel, native libraries, Android runtime, and application framework

  • OOP concepts in Java are inheritance, polymorphism, encapsulation, and abstraction

  • Example of inheritance in Java: class B extends class A

  • Example of polymorphism in Jav...read more

Q4. What is Activity life cycle

Ans.

Activity life cycle refers to the series of states an activity goes through from creation to destruction.

  • Activity is created with onCreate() method

  • Activity is started with onStart() method

  • Activity is resumed with onResume() method

  • Activity is paused with onPause() method

  • Activity is stopped with onStop() method

  • Activity is destroyed with onDestroy() method

Are these interview questions helpful?

Q5. What is Coroutines?

Ans.

Coroutines are a way to perform asynchronous programming in a sequential manner in Android development.

  • Coroutines allow developers to write asynchronous code that looks like synchronous code.

  • They are lightweight and efficient compared to traditional threading.

  • Coroutines can be used for tasks like network calls, database operations, and long-running tasks.

  • Example: Using coroutines to fetch data from a remote server and update the UI when the data is received.

Android Jobs

SSE Android 1-2 years
Info Edge India Ltd.
3.9
Noida
MS/ECO-XC_Android_Automotive_Expert 3-7 years
Robert Bosch Engineering and Business Solutions Private Limited
4.2
Hosur
Android Platform 6-9 years
Harman Connected Services Corporation India Pvt.
3.8
Bangalore / Bengaluru
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.9
 • 8.1k Interviews
3.7
 • 7.6k Interviews
3.8
 • 5.6k Interviews
3.6
 • 357 Interviews
4.0
 • 337 Interviews
3.5
 • 13 Interviews
4.4
 • 7 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Android Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter