Premium Employer

Infosys

3.6
based on 40.9k Reviews
Filter interviews by

10+ Indiglobe IT Solutions Interview Questions and Answers

Updated 17 Oct 2024
Popular Designations

Q1. Write a functional interface. Refer it to a Lamda Expression. Show it practically while explaining each step

Ans.

A functional interface is a single abstract method interface. It can be referred to using a lambda expression.

  • Functional interfaces have only one abstract method

  • Lambda expressions can be used to implement functional interfaces

  • Lambda expressions provide a concise way to write anonymous functions

  • Functional interfaces can be used as method parameters or return types

Add your answer

Q2. What is HashMap? While Interating through it is it mutable?

Ans.

HashMap is a data structure in Java that stores key-value pairs. It is mutable while iterating through it.

  • HashMap is part of the Java Collections Framework.

  • It allows null values and at most one null key.

  • It provides constant-time performance for basic operations like get and put.

  • While iterating through a HashMap, it is mutable and can throw ConcurrentModificationException if modified.

  • To avoid this, use an Iterator or ConcurrentHashMap.

Add your answer

Q3. What are the various annotations used in SpringBoot (explain)

Ans.

Various annotations used in SpringBoot

  • 1. @SpringBootApplication: Marks the main class of a Spring Boot application

  • 2. @RestController: Marks a class as a RESTful controller

  • 3. @RequestMapping: Maps HTTP requests to handler methods

  • 4. @Autowired: Injects dependencies automatically

  • 5. @Component: Marks a class as a Spring component

  • 6. @Service: Marks a class as a service component

  • 7. @Repository: Marks a class as a repository component

  • 8. @Configuration: Marks a class as a source of b...read more

Add your answer

Q4. Find the duplicate element in a given array using Java 8 features.

Ans.

Find duplicate element in array using Java 8 features.

  • Convert array to stream using Arrays.stream()

  • Use Collectors.groupingBy() to group elements by their occurrence

  • Filter the grouped elements to find duplicates

Add your answer
Discover Indiglobe IT Solutions interview dos and don'ts from real experiences

Q5. What are the different bean scopes in Spring

Ans.

The different bean scopes in Spring are singleton, prototype, request, session, and application.

  • Singleton scope creates a single instance of a bean per Spring IoC container.

  • Prototype scope creates a new instance of a bean every time it is requested.

  • Request scope creates a new instance of a bean for each HTTP request.

  • Session scope creates a new instance of a bean for each HTTP session.

  • Application scope creates a single instance of a bean per ServletContext.

Add your answer

Q6. Coding: Sort list of student details using mark.

Ans.

Sort list of student details by mark.

  • Create a custom class Student with attributes like name, mark.

  • Implement Comparator interface to sort by mark.

  • Use Collections.sort() method to sort the list of students.

Add your answer
Are these interview questions helpful?

Q7. What is transient keyword in Java?

Ans.

The transient keyword in Java is used to indicate that a variable should not be serialized.

  • Variables marked as transient are not included in the serialization process

  • Transient variables are not saved when an object is serialized and are set to their default values when the object is deserialized

  • Useful for excluding sensitive or unnecessary data from being serialized

Add your answer

Q8. Is Java pass by value or by reference

Ans.

Java is pass by value

  • Java is pass by value, meaning a copy of the variable is passed to a method

  • Changes made to the copy inside the method do not affect the original variable

  • However, if the variable is an object reference, the reference is passed by value

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is Method Overloading vs Overriding

Ans.

Method Overloading is having multiple methods with the same name but different parameters. Method Overriding is having a method in a subclass with the same name and parameters as in the superclass.

  • Method Overloading is used to provide different ways of calling the same method with different parameters.

  • Method Overriding is used to provide a specific implementation of a method that is already provided by its superclass.

  • Method Overloading is resolved at compile-time based on the...read more

Add your answer

Q10. Difference btw string builder, and buffer

Ans.

String Builder is not synchronized, while String Buffer is synchronized.

  • String Builder is faster than String Buffer because it is not synchronized.

  • String Buffer is thread-safe, while String Builder is not.

  • Use String Builder when you do not need thread safety, and String Buffer when you do.

Add your answer

Q11. What are the features of Java8

Ans.

Java 8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.

  • Lambda expressions allow writing concise and functional code.

  • Functional interfaces provide a way to define and use lambda expressions.

  • Streams enable processing collections of data in a functional and parallel way.

  • Default methods allow adding new methods to existing interfaces without breaking compatibility.

  • Other features include the new Date and Time API, i...read more

Add your answer

Q12. list out second largest salary using java 8

Ans.

Using Java 8, find the second largest salary from a list of salaries.

  • Sort the list of salaries in descending order using streams and lambda expressions.

  • Skip the first element (largest salary) and find the first element (second largest salary).

Add your answer

Q13. Given is two arrays! Merge and sort them

Ans.

Merge and sort two arrays

  • Use the merge sort algorithm to merge and sort the arrays

  • Convert the arrays to a list of strings before merging and sorting

  • Handle null or empty arrays as special cases

Add your answer

Q14. Find the third highest salary in sql

Ans.

To find the third highest salary in SQL, you can use the 'ORDER BY' clause and 'LIMIT' keyword.

  • Write a SQL query to select distinct salaries from the table

  • Order the salaries in descending order using the 'ORDER BY' clause

  • Use the 'LIMIT' keyword to limit the result to the third row

  • Retrieve the third highest salary from the result

Add your answer

Q15. list all the sum of list

Ans.

Calculate the sum of all elements in a list

  • Iterate through the list and add each element to a running total

  • Return the total sum at the end

Add your answer

Q16. What is streams API

Ans.

Streams API is a feature in Java that allows for processing sequences of elements efficiently.

  • Streams API provides a way to perform operations on collections of objects in a functional style.

  • It supports operations like filter, map, reduce, and collect.

  • Streams can be sequential or parallel, allowing for efficient processing of large datasets.

  • Example: List<String> names = Arrays.asList("Alice", "Bob", "Charlie"); names.stream().filter(name -> name.startsWith("A")).forEach(Syste...read more

Add your answer

Q17. Why String immutable

Ans.

String is immutable to ensure security, thread-safety, and caching benefits.

  • Immutable strings prevent malicious code from modifying the string content.

  • Immutable strings can be safely shared across multiple threads without synchronization issues.

  • Immutable strings can be cached for better performance.

  • Examples of immutable string methods include substring(), toUpperCase(), and trim().

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Indiglobe IT Solutions

based on 9 interviews
1 Interview rounds
Resume Shortlist Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Java Developer Interview Questions from Similar Companies

3.8
 • 53 Interview Questions
3.7
 • 23 Interview Questions
3.8
 • 13 Interview Questions
3.3
 • 11 Interview Questions
4.4
 • 10 Interview Questions
3.5
 • 10 Interview Questions
View all
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
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

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