Perennial Systems
Debono Flexcom (I) Interview Questions and Answers
Q1. with stream API, find employees with salary greater than 50000 and arrange it in descending order. using streams find average of numbers in a list
Use stream API to filter employees by salary and find average of numbers in a list.
Filter employees with salary > 50000 and sort in descending order using stream API
Calculate average of numbers in a list using stream API
Q2. apring annotations, how to exclude class configuration
Use @ComponentScan annotation with excludeFilters to exclude class configuration in Spring
Use @ComponentScan annotation with excludeFilters parameter to exclude specific classes from component scanning
Specify the classes to be excluded using TypeFilter implementations like AnnotationTypeFilter or AssignableTypeFilter
Example: @ComponentScan(basePackages = {"com.example"}, excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {ExcludedClass.class})...read more
Q3. write code for time conversion- string "10:00 AM" if added 10 in that, op 8 pm
Convert time string by adding 10 hours and display in 12-hour format
Split the input string into hours and minutes
Convert the hours to 24-hour format and add 10 hours
Handle the case where the result goes past 12 hours
Convert the result back to 12-hour format and display
Q4. what is broker, message, corelation id in kafka
In Kafka, a broker is a server that stores and manages the message data, a message is a unit of data sent through Kafka, and a correlation id is used to link related messages.
A broker in Kafka is a server that stores and manages the message data.
A message in Kafka is a unit of data sent through Kafka from a producer to a consumer.
A correlation id in Kafka is used to link related messages together, allowing for tracking and processing of related messages.
Q5. find the occurence of first non-repeating char in a string
Use a hashmap to store the frequency of each character and then iterate through the string to find the first non-repeating character.
Create a hashmap to store the frequency of each character in the string.
Iterate through the string and update the frequency in the hashmap.
Iterate through the string again and return the first character with frequency 1.
Q6. Junit how to check if object is null
Use assertNotNull() method from Junit to check if an object is null.
Use assertNotNull() method from Junit library
Pass the object as a parameter to assertNotNull() method
If the object is null, the test will fail
Q7. API gateway responsibilities
API gateway is responsible for managing, securing, and optimizing API traffic between clients and services.
Acts as a single entry point for all API requests
Handles authentication and authorization
Provides rate limiting and throttling
Logs and monitors API traffic
Transforms requests and responses
Caches responses for improved performance
Q8. class object vs bean
Class object is a blueprint for creating objects, while a bean is a Java object that is serializable, has a no-argument constructor, and allows access to properties using getter and setter methods.
Class object is a template for creating instances of a class, defining its properties and methods.
Bean is a Java object that follows specific conventions like being serializable, having a no-argument constructor, and providing getter and setter methods for accessing properties.
Examp...read more
Top Senior Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month