Coforge
Hetco Interview Questions and Answers
Q1. Adding port number as 0 for a service in Spring boot
Setting port number as 0 in Spring Boot for a service
Setting port number as 0 allows the operating system to choose an available port
This is useful when running multiple instances of the same service on the same machine
To set port number as 0 in Spring Boot, add 'server.port=0' to application.properties or application.yml
Q2. Impact of changing annotations on spring boot classes
Changing annotations on Spring Boot classes can have significant impact on the application.
Changing annotations can affect the behavior of the application
Annotations can control the lifecycle of beans, security, caching, etc.
Removing or modifying annotations can cause runtime errors
Adding new annotations can introduce new functionality
Annotations can affect the performance of the application
Q3. Write program to filter employees using java streams
Program to filter employees using Java streams
Create a list of employees
Use stream() method to convert list to stream
Use filter() method to filter employees based on condition
Use collect() method to convert stream back to list
Q4. Singleton class in Java Why string is immutable in Java ? Difference between ArrayList & LinkedList What is IOC in Spring Find 3rd largest integer in integer array using streams in java. Java 8 nee features Sor...
read moreA set of interview questions for a Senior Java Developer position.
Singleton class in Java is a class that allows only one instance of itself to be created.
String is immutable in Java because it ensures thread safety and allows for efficient memory management.
ArrayList and LinkedList are both implementations of the List interface, but differ in their underlying data structure and performance characteristics.
IOC (Inversion of Control) in Spring is a design principle that allows...read more
Q5. Differnce between ArrayList and LinkedList
ArrayList is implemented as a resizable array while LinkedList is implemented as a doubly linked list.
ArrayList provides constant time for accessing elements while LinkedList provides constant time for adding or removing elements.
ArrayList is better for storing and accessing data while LinkedList is better for manipulating data.
ArrayList is faster for iterating through elements while LinkedList is faster for adding or removing elements in the middle of the list.
Q6. Different exceptions in Spring Boot
Spring Boot has various exceptions for different scenarios.
DataAccessException - for database access errors
HttpMessageNotReadableException - for errors in HTTP message conversion
MethodArgumentNotValidException - for validation errors in request parameters
NoSuchBeanDefinitionException - for errors in bean configuration
UnauthorizedException - for authentication and authorization errors
Q7. What is java and springboot
Java is a popular programming language used for developing various applications. Spring Boot is a framework that simplifies the development of Java applications.
Java is an object-oriented programming language known for its platform independence and versatility.
Spring Boot is a framework that simplifies the development of Java applications by providing pre-configured settings and tools.
Spring Boot allows for rapid development and deployment of Java applications, making it popu...read more
Q8. What is collection framework
Collection framework is a set of classes and interfaces that provide a standard way to store and manipulate groups of objects.
It provides interfaces like List, Set, and Map for storing collections of objects.
It includes classes like ArrayList, LinkedList, HashSet, and HashMap for implementing these interfaces.
Collections framework simplifies the process of storing, retrieving, and manipulating data in Java.
Interview Process at Hetco
Top Senior Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month