android Lead
android Lead Interview Questions and Answers
Q1. Write a program to slice the array from given index and re-arrange the array without using extra variables, inbuilt methods
Program to slice and rearrange array without extra variables or inbuilt methods
Use a loop to iterate through the array and shift elements to the left
Use a temporary variable to store the first element and move the rest of the elements one position to the left
Repeat the above step until the desired index is reached
Then move the temporary variable to the end of the sliced array
Continue shifting the remaining elements to the left until the end of the array is reached
Q2. What is launch modes in android
Launch modes determine how a new instance of an activity is associated with the current task.
There are four launch modes: standard, singleTop, singleTask, and singleInstance.
Standard is the default mode and creates a new instance of the activity every time it is launched.
SingleTop mode checks if there is already an instance of the activity at the top of the task stack and reuses it if possible.
SingleTask mode creates a new task for the activity and places it at the root of th...read more
Q3. What is inline function
Inline function is a function that is expanded in line when it is called, rather than calling a separate function.
Inline functions are used to improve performance by reducing the overhead of function calls.
They are defined using the 'inline' keyword.
They are commonly used in C++ programming.
Example: inline int add(int a, int b) { return a + b; }
Q4. What is use of factory
A factory is used to create objects of a specific class without exposing the creation logic to the client.
Factories provide a way to create objects without exposing the creation logic to the client.
They can be used to create objects of a specific class or a group of related classes.
Factories can be used to implement the Singleton pattern, where only one instance of a class is created.
They can also be used to implement the Abstract Factory pattern, where a family of related ob...read more
Q5. MVI Vs MVVM
MVI focuses on unidirectional data flow and state management, while MVVM separates the UI logic from the business logic.
MVI stands for Model-View-Intent and emphasizes a single direction of data flow.
MVVM stands for Model-View-ViewModel and separates the UI logic from the business logic.
MVI is more predictable and easier to test due to its unidirectional data flow.
MVVM is widely used in Android development and provides a clear separation of concerns.
MVI is gaining popularity ...read more
android Lead Jobs
Interview Questions of Similar Designations
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month