Add office photos
Engaged Employer

Capgemini

3.7
based on 40.2k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

10+ Goutham Institution Interview Questions and Answers

Updated 10 Dec 2024
Popular Designations

Q1. 1.difference between list,set and map in java collections 2.exception Handling 3.difference between throw and throws 4.why to create a thread 5.maker interface in java and its use 6.Spring boot which you used i...

read more
Ans.

Interview questions for Senior Java Developer

  • List is an ordered collection, Set is an unordered collection with no duplicates, Map is a key-value pair collection

  • Exception handling is used to handle runtime errors and prevent program crashes

  • Throw is used to throw an exception explicitly, Throws is used to declare an exception that a method may throw

  • Threads are used to execute multiple tasks simultaneously and improve program performance

  • Marker interface is an interface with no ...read more

Add your answer

Q2. what is marker interface what is Stream api difference between Runnable and callable difference between comparable and compartor Internal working of hashMap Difference between Spring and Springboot

Ans.

Marker interface is an interface with no methods, used to mark classes for special treatment.

  • Marker interface is an empty interface with no methods

  • It is used to mark classes for special treatment

  • Examples include Serializable, Cloneable interfaces

Add your answer

Q3. What are the advantages of spring boot over spring?

Ans.

Spring Boot simplifies the development of Spring applications by providing out-of-the-box configurations and reducing boilerplate code.

  • Spring Boot provides a quick and easy way to set up a Spring application with minimal configuration.

  • It includes embedded servers like Tomcat, Jetty, or Undertow, eliminating the need for deploying WAR files.

  • Auto-configuration feature in Spring Boot automatically configures the application based on dependencies in the classpath.

  • Spring Boot Actu...read more

Add your answer

Q4. Difference between post & get mapping in spring boot and can we update the data using post mapping?

Ans.

Post mapping is used to create or update data, while get mapping is used to retrieve data. Yes, data can be updated using post mapping.

  • Post mapping is used to create or update data in the server, while get mapping is used to retrieve data from the server.

  • Post mapping is typically used for operations that modify data, such as creating a new resource or updating an existing one.

  • Get mapping is used for operations that do not modify data, such as retrieving information or fetchin...read more

Add your answer
Discover Goutham Institution interview dos and don'ts from real experiences

Q5. How connect two dbs in spring boot?

Ans.

To connect two databases in Spring Boot, you can configure multiple data sources and use JPA to interact with them.

  • Configure multiple data sources in application.properties or application.yml file

  • Define multiple DataSource beans in your configuration class

  • Use @Primary annotation to specify the primary data source

  • Use @Qualifier annotation to specify which data source to use in a specific repository or service

  • Use @Transactional annotation with the appropriate data source to per...read more

Add your answer

Q6. Difference between @Service and @Component

Ans.

The @Service annotation is used to annotate classes at the service layer, while @Component is a generic stereotype annotation for any Spring-managed component.

  • The @Service annotation is a specialization of the @Component annotation, indicating that a class is a service layer component.

  • Using @Service helps in better code organization and readability by clearly defining the purpose of the annotated class.

  • Spring automatically detects classes annotated with @Service and registers...read more

Add your answer
Are these interview questions helpful?

Q7. Diffence between @Controller and @RestController

Ans.

The @Controller annotation is used to define a controller class in Spring MVC, while @RestController is used to define a RESTful web service controller.

  • The @Controller annotation is used to create a controller class that handles HTTP requests and returns a view, typically used in traditional Spring MVC applications.

  • The @RestController annotation is used to create a controller class that handles HTTP requests and returns data directly in JSON or XML format, commonly used in RE...read more

Add your answer

Q8. various follow ups on monolithic vs microservices architecture

Ans.

Microservices architecture allows for modular, scalable, and flexible development compared to monolithic architecture.

  • Microservices break down applications into smaller, independent services that communicate through APIs.

  • Each microservice can be developed, deployed, and scaled independently, leading to faster development cycles and easier maintenance.

  • Monolithic architecture involves building an entire application as a single unit, making it harder to scale and update.

  • Microser...read more

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

Q9. What is Hashmap in java collections

Ans.

HashMap is a data structure in Java collections that stores key-value pairs.

  • HashMap implements the Map interface and uses hashing to store elements.

  • It allows null values and one null key.

  • Example: HashMap map = new HashMap<>();

Add your answer

Q10. Explain about SOLID principles in java?

Ans.

SOLID principles are a set of five design principles in object-oriented programming to make software designs more understandable, flexible, and maintainable.

  • S - Single Responsibility Principle: A class should have only one reason to change.

  • O - Open/Closed Principle: Classes should be open for extension but closed for modification.

  • L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the functionality....read more

Add your answer

Q11. Write a program on java8 ?

Ans.

Program using Java 8 features to filter a list of strings starting with 'A' and convert them to uppercase.

  • Use Java 8 stream API to filter the strings starting with 'A'.

  • Use map() function to convert the filtered strings to uppercase.

  • Collect the results into a new list using collect() function.

Add your answer

Q12. Multiple threading in Spring boot

Ans.

Spring Boot supports multiple threading through the use of Java's Executor framework.

  • Spring Boot provides a TaskExecutor interface for executing tasks asynchronously.

  • The @Async annotation can be used to mark a method as asynchronous.

  • Spring Boot also supports scheduling tasks using the @Scheduled annotation.

  • Thread safety can be ensured through the use of synchronized blocks or locks.

  • Examples: implementing a background task to send emails, scheduling a task to update a cache pe...read more

Add your answer

Q13. Future vs Completable Future differenes

Ans.

Future is a concurrent programming construct while Completable Future is an extension of Future with more features.

  • Future is a simple interface that represents the result of an asynchronous computation.

  • Completable Future is an extension of Future that provides more features like chaining, combining, and exception handling.

  • Completable Future can be used to create a pipeline of asynchronous tasks.

  • Completable Future can also be used to handle exceptions in a more elegant way.

  • Com...read more

Add your answer

Q14. What is IOC in spring

Ans.

IOC stands for Inversion of Control in Spring, a design principle where the control of object creation and lifecycle is shifted to a container.

  • IOC is a design principle in which the flow of control is inverted compared to traditional programming.

  • In Spring, IOC is achieved through dependency injection, where objects are provided their dependencies rather than creating them themselves.

  • IOC helps in decoupling components, making the code more modular, testable, and maintainable.

  • E...read more

Add your answer

Q15. Microservices design patterns?

Ans.

Design patterns in microservices architecture help in solving common problems and improving scalability, maintainability, and flexibility.

  • Service Registry pattern - used for service discovery and registration, such as Netflix Eureka

  • Circuit Breaker pattern - prevents cascading failures by failing fast and providing fallback mechanisms, like Hystrix

  • API Gateway pattern - acts as a single entry point for clients to access multiple services, for example, Zuul

  • Saga pattern - manages...read more

Add your answer

Q16. Find duplicate character using Stream

Ans.

Using Java Stream to find duplicate characters in an array of strings

  • Use flatMap to convert the array of strings into a stream of characters

  • Use Collectors.groupingBy to group the characters by count

  • Filter the grouped characters to find duplicates

Add your answer

Q17. JPA connection from spring boot

Ans.

JPA connection in Spring Boot allows for easy integration of Java Persistence API with the Spring framework.

  • Use @Entity annotation to mark a class as an entity for JPA

  • Configure data source properties in application.properties file

  • Use @Repository annotation to enable JPA repository functionality

Add your answer

Q18. Index in MySQL?

Ans.

An index in MySQL is a data structure that improves the speed of data retrieval operations on a database table.

  • Indexes are used to quickly locate rows in a table without having to search every row.

  • They can be created on one or more columns in a table.

  • Indexes can be unique, which means that the indexed columns must contain unique values.

  • Examples of indexes include primary keys, unique keys, and regular indexes.

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

Interview Process at Goutham Institution

based on 20 interviews
2 Interview rounds
Technical Round - 1
Technical Round - 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Java Developer Interview Questions from Similar Companies

3.6
 • 23 Interview Questions
3.8
 • 19 Interview Questions
3.7
 • 16 Interview Questions
3.8
 • 15 Interview Questions
3.8
 • 13 Interview Questions
3.7
 • 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
70 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