IBM
Universal Hunt Interview Questions and Answers
Q1. 1. Abstraction vs Inheritance 2. What is Garbage collector? 3. What is class loader? 4. Spring security 5. Scopes of bean 6. Wait , notify and notify all 7. Class level vs object level local 8. Arraylist vs Lin...
read moreJava interview questions covering topics like abstraction, inheritance, garbage collector, class loader, Spring security, bean scopes, wait-notify, class vs object level local, ArrayList vs LinkedList, Singleton class, and RestController vs Controller.
Abstraction focuses on hiding implementation details while inheritance allows a class to inherit properties and methods from another class.
Garbage collector is a program that automatically frees up memory by deleting objects tha...read more
Q2. what are the advantages of spring boot
Spring Boot provides a simplified way to create stand-alone, production-grade Spring-based Applications.
Rapid application development
Embedded server for easy deployment
Auto-configuration for setting up Spring projects quickly
Microservices support
Actuator for monitoring and managing applications
Q3. How to make class as a immutable?
To make a class immutable in Java, make it final, declare all fields as private and final, and provide only getter methods.
Declare the class as final to prevent inheritance
Declare all fields as private and final to prevent modification
Provide only getter methods to access the fields
Avoid providing setter methods or any other methods that modify the state of the class
Q4. Difference between Interface and Abstract class?
An interface is a contract that defines a set of methods that a class must implement, while an abstract class is a class that cannot be instantiated and can contain both abstract and non-abstract methods.
An interface can only have abstract methods, while an abstract class can have both abstract and non-abstract methods.
A class can implement multiple interfaces, but can only extend a single abstract class.
Interfaces are used to achieve multiple inheritance in Java.
Abstract cla...read more
Q5. Difference between hashmap and hash table
HashMap is non-synchronized and allows null values, while HashTable is synchronized and does not allow null values.
HashMap is non-synchronized, meaning it is not thread-safe, while HashTable is synchronized and thread-safe.
HashMap allows null values for both keys and values, while HashTable does not allow null keys or values.
HashMap is generally preferred for non-thread-safe applications, while HashTable is used in multi-threaded environments.
Q6. microservices architecture in spring microservices
Microservices architecture in Spring is a way of designing software applications as a collection of loosely coupled services.
Microservices architecture breaks down a large application into smaller, independent services that can be developed, deployed, and scaled independently.
Spring Boot and Spring Cloud are commonly used frameworks for building microservices in Java.
Each microservice typically has its own database and communicates with other services through APIs.
Microservic...read more
Q7. Give three date functions?
Three date functions in Java are getDate(), getMonth(), and getYear().
getDate() - Returns the day of the month represented by this Date object.
getMonth() - Returns the month represented by this Date object.
getYear() - Returns the year represented by this Date object.
More about working at IBM
Interview Process at Universal Hunt
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month