IntelliaTech Solutions
Kerakoll Interview Questions and Answers
Q1. WAP I/p : String str = "india is best country". O/P : str = "country india is best". reverse the string words best of length?
Reverse the words in a string of a specific length.
Split the input string into words
Iterate through the words and reverse the ones with a length equal to the specified length
Join the reversed words back into a single string
Q2. WAP to print unique elements from given 2 Arrays ? Example arr[1,2,3,4], arr1[1,2,4,5,5,6] O/P : [3,5,6]
Write a Java program to print unique elements from two given arrays.
Create a HashSet to store unique elements from both arrays.
Iterate through each element in both arrays and add them to the HashSet.
Convert the HashSet back to an array and print the unique elements.
Q3. Microservice architecture and how 2 microservices communicate with each other?
Microservice architecture is a design approach where an application is composed of small, independent services that communicate over well-defined APIs.
Microservices communicate with each other through APIs, typically using HTTP/REST or messaging protocols like RabbitMQ or Kafka.
Service discovery mechanisms like Eureka or Consul can be used to locate and connect to other microservices.
API gateways can be used to manage and secure communication between microservices.
Microservic...read more
Q4. Java 8 Features and internal working of Hashmap and inhacement happens in java 8 in HashMap?
Java 8 introduced new features like lambda expressions and streams. HashMap in Java 8 has improvements like tree bins for better performance.
Java 8 features include lambda expressions, streams, default methods in interfaces, etc.
Internal working of HashMap involves using buckets and linked lists or trees for collision resolution.
In Java 8, HashMap introduced tree bins to handle situations where a bucket has too many elements, improving performance.
Enhancements in Java 8 HashM...read more
Q5. WAP to count occurence of each character from given String?
Count occurrence of each character in a given string.
Create an array of size 256 to store count of each character (ASCII range)
Iterate through the string and increment count for each character
Print the count of each character at the end
Q6. What is RestFulAPI's?
RestFulAPI's are a type of web service that follows the principles of REST architecture.
RestFulAPI's use standard HTTP methods like GET, POST, PUT, DELETE for communication.
They are stateless, meaning each request from a client must contain all the information needed to fulfill the request.
They typically return data in JSON or XML format.
RestFulAPI's are designed to be easily scalable and maintainable.
Example: Twitter API, Google Maps API.
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month