Blog Archives
1 2

01: Can you design classes & interfaces using OO?

Q1. How would you go about designing a “farm animals” application where animals like cow, pig, horse, etc move from a barn to pasture, a stable to paddock, etc? The solution should also cater for extension into other types of animals like circus animals, wild animals, etc in the future….… Read more ...



01: Q13 “12 Rules” for REST API design & development

These are more like rules to develop RESTFul web services as opposed to being the best practices. REST is an architectural style without any contracts or specifications. So, it is imperative to apply the following rules for better REST API design.… Read more ...



02: 5 Java multithreading scenarios interview Questions & Answers

Java interview questions & answers on multithreading scenarios to judge your experience in building applications with concurrency in mind. Q1. Can you give some scenarios where you built concurrent systems? A1. In a concurrent system different threads run concurrently, whereas in a distributed system different processes often in separate machines…

Read more ...


02: Scenarios based Java OO concepts & GoF design patterns – naive Template Method pattern

Scenarios based Java OO concepts & GoF design patterns

Read more ...


03: How would you go about designing an online shopping cart?

This question is a very popular white board session question for both Java architects and experienced JEE Developers. You need to draw on your experience to tackle this question as there are no right or wrong answers. These high level diagrams and summary will help you refresh your memory.… Read more ...



03: Scenarios based Java OO concepts & GoF design patterns – Strategy Pattern

The following post improves on the design flaws listed in the previous post entitled 02: Scenarios based Java OO design & GoF design patterns – naive Template Method pattern. Scenario: A company named XYZ Retail is in the business of selling Books, CDs and Cosmetics.… Read more ...



05: Q19-Q24 How to create a well designed Java application?

A software application is built by coupling various classes, modules, and components. Without coupling, you can’t build a software system. But, the software applications are always subject to changes and enhancements. So, you need to build your applications such a way that they can not only adapt to growing requirements,…

Read more ...


06: Q25 – Q32 SOLID design principles interview questions & answers for Java developers

Design principles interview questions & answers for Java developers so that you can expand your OOP skills to design robust Java apps Q25. What are the SOLID design principles? A25. SOLID is an abbreviation for 5 design principles. SRP (Single Responsibility Principle) If you have a class with calculation logic,…

Read more ...
Tags:

1. Asynchronous processing in Java real life examples – part-1

The scenario based questions are very popular with the job interviewers, and some scenario based questions are related to decoupling and asynchronous (aka non-blocking) processing in Java with message queues/topics, database tables where one process inserts data and another process consumes the inserted data, and Future objects in Java multi-threading….… Read more ...



10: 8 Java Maps & Caching Data in Java Interview Q&As

Q1. What is the purpose of a Map interface in Java collection API? A1. A map is a set of associations between pairs of objects. One is known as a “key” and the other is known as a “value”. It is used very frequently in programming in case where for…

Read more ...


10+ Domain Driven Design (i.e. DDD) Interview Q&As

Q1. What is Domain Driven Design (i.e. DDD)? What is DDD oriented microservice? A1. Domain-driven design advocates modelling based on the reality of business as relevant to your use cases. In the context of building applications, DDD talks about problems as domains.… Read more ...

Tags:

10+ Key Java Microservices Interview Questions & Answers

Java microservices interview questions and answers covering microservices patterns, best practices, Springboot and Spring cloud . Q1. How will you go about choosing REST vs Messaging for Microservices? A1. Microservices can be invoked both synchronously and asynchronously. Microservices must be organized around business functionalities like Customers, Orders, Invoices, Products, etc….… Read more ...



15 Database design interview Q&As

Q1. What is normalization? When to denormalize? A1. Normalization is a design technique that is widely used as a guide in designing relational databases. Normalization is essentially a two step process that puts data into tabular form by removing repeating groups and then removes duplicated data from the relational tables….… Read more ...



15 slacknesses or lack of experience that can come back & bite you in the back

Production issues seek the attention of middle and top level management. Often these are intermittent issues that are harder to reproduce in lower environments without the right know-hows & tools. Some will shrug it off as “Cannot be reproduced“, whilst others will seize the opportunity to showcase their technical strengths & know hows to go places.… Read more ...



2. Asynchronous processing in Java real life examples – part-2

Extends: 1. Asynchronous processing in Java real life examples – part-1. Example 3: Trade execution reports are received & processed asynchronously If you are working in an online trading application, you may want the functionality to queue trades and process them when the stock market opens.… Read more ...



2. Implement an in-memory LRU cache in Java with TTL

Q: Implement an in-memory cache in Java without using any frameworks. The basic requirements are – The TTL (Time To Live) for the cache items are ~10 seconds [just for demo]. – The system has plenty of memory. – Each item may or may not be accessed during the TTL….… Read more ...



6 tips to go about writing loosely coupled Java applications

6 tips to go about writing loosely coupled Java applications useful not only for talking the talk in Java job interviews, but also to build maintainable Java applications. Loose coupling in microservice architecture means microservices should know little about each other, and any change to one service should not affect…

Read more ...


Auditing, data retention and archiving interview Q&As

Q1 What are some of the considerations in auditing database table data? A1 1) Tables are created with auditable columns like created_by, created_date, updated_by, and updated_date, and synch_date or timestamp. You can also have a version column. Thes fields are handy to track changes.… Read more ...



Class invariant & designing by contract in Java

Q1. What is a class invariant? A1. Class invariant is — what must be true about each instance of a class? If an invariant fails then there could be a bug in either calling-method or called-method. It is convenient to put all the expressions required for checking invariants into reusable…

Read more ...


Event sourcing & CQRS interview Q&As

Most feasible way to handle consistency across microservices is via eventual consistency. This model doesn’t enforce distributed ACID transactions across microservices. Event sourcing is an event-centric approach to business logic design and persistence. It favours to use some mechanisms of ensuring that the system would be eventually consistent at some…

Read more ...


1 2
Don't be overwhelmed by the number of Q&As & tech stacks as nobody knows everything, and often key Q&As at the right moment makes a difference.

500+ Java Interview FAQs

Java & Big Data Tutorials

Top