Infosys
Interview Questions and Answers
Q1. what is Corotuine and explain builder type.
Coroutines are a way to perform asynchronous programming in Android. Builder type is used to create and configure a coroutine.
Coroutines in Android are used for managing asynchronous tasks without blocking the main thread.
Builder type is used to create a coroutine with specific configuration options.
Example: 'launch' is a builder type used to start a new coroutine.
Q2. what is Higher order function
Higher order function is a function that can take other functions as parameters or return functions as results.
Higher order functions can be passed as arguments to other functions.
Higher order functions can return functions as results.
Examples include map, filter, and reduce functions in functional programming.
Q3. what is inline keyword
The inline keyword is used in Kotlin to suggest that a function should be inlined at the call site.
Used to eliminate the overhead of function calls by copying the function code directly at the call site
Helps in improving performance by reducing the function call overhead
Should be used for small functions or lambdas to avoid unnecessary function call overhead
Q4. Unit testing with example of code
Unit testing is a software testing method where individual units or components of a software are tested in isolation.
Unit testing helps in identifying bugs early in the development process.
It ensures that each unit of code works correctly on its own.
Unit tests are typically written using testing frameworks like JUnit or Mockito.
Example: Testing a function that calculates the sum of two numbers.
Q5. Explain the Agail methodology
Agile methodology is a project management approach that emphasizes flexibility, collaboration, and iterative development.
Agile methodology focuses on delivering working software in short, iterative cycles called sprints.
It values customer collaboration and responding to change over following a strict plan.
Key principles include individuals and interactions over processes and tools, working software over comprehensive documentation, customer collaboration over contract negotia...read more
Q6. Explain solid principle
SOLID is a set of five design principles that help developers create more maintainable and scalable software.
Single Responsibility Principle (SRP) - A class should have only one reason to change.
Open/Closed Principle (OCP) - Software entities should be open for extension but closed for modification.
Liskov Substitution Principle (LSP) - Objects of a superclass should be replaceable with objects of its subclasses without affecting the program's correctness.
Interface Segregation...read more
Interview Process at null
Reviews
Interviews
Salaries
Users/Month