Java Interview Questions
Everything on SkillVeris tagged Java Interview Questions — collected across the glossary, study notes, blog, and cheat sheets.
190 resources across 1 library
Interview Questions(190)
What is Polymorphism in OOP?
Polymorphism is the object-oriented principle that lets objects of different classes respond to the same method call in their own class-specific way.
Difference Between Abstraction and Encapsulation
Abstraction hides complexity by exposing only the essential behavior of an object, while encapsulation hides an object’s internal data by bundling it with the…
What are the Four Pillars of OOP?
The four pillars of object-oriented programming are Encapsulation, Abstraction, Inheritance, and Polymorphism — the principles that structure code around objec…
Difference Between Interface and Abstract Class
An interface defines a contract of methods a class must implement with no state, while an abstract class can provide partial implementation and state and serve…
Composition vs Inheritance in OOP
Inheritance models an "is-a" relationship where a class derives from a parent, while composition models a "has-a" relationship where a class is built from othe…
What are SOLID Principles?
SOLID is five object-oriented design principles — Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion — th…
What is Inheritance in OOP?
Inheritance is the object-oriented mechanism by which a class (the subclass) acquires the fields and methods of another class (the superclass), enabling code r…
Method Overloading vs Overriding
Method overloading is defining multiple methods with the same name but different parameter lists within a class, resolved at compile time, while method overrid…
What is Encapsulation in OOP?
Encapsulation is the object-oriented principle of bundling an object’s data with the methods that operate on it and restricting direct access to that data from…
What is a Constructor in OOP?
A constructor is a special method invoked automatically when an object is created that initializes the object’s state, sharing the class’s name and having no r…
What is Abstraction in OOP?
Abstraction is the object-oriented principle of exposing only the essential features and behavior of an object while hiding the underlying implementation compl…
What is the Builder Pattern?
The Builder pattern is a creational design pattern that separates the step-by-step construction of a complex object from its final representation, letting the…
What is the Prototype Pattern?
The Prototype pattern is a creational design pattern that creates new objects by cloning an existing, fully configured instance rather than constructing one fr…
What is the Adapter Pattern?
The Adapter pattern is a structural design pattern that converts the interface of an existing class into another interface a client expects, letting otherwise…
What is the Bridge Pattern?
The Bridge pattern is a structural design pattern that decouples an abstraction from its implementation by putting them in two separate class hierarchies conne…
What is the Composite Pattern?
The Composite pattern is a structural design pattern that composes objects into tree structures to represent part-whole hierarchies, letting clients treat indi…
What is the Decorator Pattern?
The Decorator pattern attaches additional responsibilities to an object dynamically by wrapping it in one or more decorator objects that share the same interfa…
What is the Facade Pattern?
The Facade pattern provides a single, simplified interface that hides the complexity of a larger subsystem made of many interacting classes, so clients can acc…
What is the Flyweight Pattern?
The Flyweight pattern minimizes memory usage by sharing immutable, common state across many similar objects instead of storing that state redundantly in each i…
What is the Proxy Pattern?
The Proxy pattern provides a surrogate object that implements the same interface as a real subject and controls access to it, allowing extra logic such as lazy…
What is the Chain of Responsibility Pattern?
The Chain of Responsibility pattern passes a request along a chain of handler objects until one of them decides to process it, decoupling the sender of a reque…
What is the Command Pattern?
The Command pattern encapsulates a request as a standalone object, bundling the receiver, the action to invoke, and its parameters, so callers can issue, queue…
What is the Interpreter Pattern?
The Interpreter pattern defines a class-based representation of a language’s grammar, using an object structure where each grammar rule is a class, and an inte…
What is the Iterator Pattern?
The Iterator pattern provides a standard way to access the elements of a collection sequentially without exposing its underlying representation, using a separa…
Showing 24 of 190.