
Infogain


Infogain Java Developer Interview Questions and Answers
Q1. Write a program to find the min and max no from the array
Program to find min and max no from array of strings
Iterate through the array and compare each element to find min and max
Use Integer.parseInt() to convert strings to integers for comparison
Initialize min and max variables with first element of array
Q2. difference between the @controller vs @restcontroller
The @Controller annotation is used to create a controller class in Spring MVC, while @RestController is used to create RESTful web services.
The @Controller annotation is used to create a controller class in Spring MVC, which is used to handle traditional web requests.
The @RestController annotation is used to create RESTful web services, which return data in JSON or XML format.
The @RestController annotation is a specialized version of the @Controller annotation that includes t...read more
Q3. Have you worked on the Data Structures
Yes, I have worked on various data structures like arrays, linked lists, stacks, queues, trees, and graphs.
I have implemented algorithms using data structures like sorting, searching, and traversal.
I have optimized code by choosing the appropriate data structure for the problem.
I have used data structures in projects to efficiently store and manipulate data.
Q4. Have you worked on the Multithreading
Yes, I have experience working on Multithreading in Java.
Implemented multithreading using Java's Thread class
Used synchronized keyword to handle thread synchronization
Utilized Executor framework for managing thread pools
Q5. Difference between the @service vs @Repository
The @Service annotation is used to mark a class as a service, while the @Repository annotation is used to mark a class as a repository.
The @Service annotation is typically used on service layer classes, which contain business logic.
The @Repository annotation is typically used on repository classes, which interact with a database or other data source.
Both annotations are used for component scanning and dependency injection in Spring framework.
Example: @Service UserService { .....read more
Q6. Difference between the Arrylist vs Linkedlist
ArrayList is implemented using a dynamic array while LinkedList is implemented using a doubly linked list.
ArrayList provides fast access to elements using index, but slow insertion and deletion.
LinkedList provides fast insertion and deletion, but slow access to elements.
Example: ArrayList is suitable for scenarios where random access is required, while LinkedList is suitable for scenarios where frequent insertion and deletion are needed.
More about working at Infogain

Interview Process at Infogain Java Developer

Top Java Developer Interview Questions from Similar Companies







Reviews
Interviews
Salaries
Users/Month

