Blog Archives

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. #1. Write stateless RESTFul services This means each request...



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,...



06: Q25 – Q32 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,...



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. Q1. What is tight coupling? A1. If class OrderServiceImpl relies on parts of class PaymentServiceImpl that are not part of interface PaymentService,...



Understanding Open/Closed Principle (OCP) from the SOLID OO principles with a Java example

Q. Is there anything wrong with the following class design? If yes, can the design be improved? JUnit test class. A. It’s not a good idea to try to anticipate changes in requirements ahead of time, but you should focus on writing code that is well written enough so that...



Why does good API design matter?

Q1. Why is a good API design important? A1. The Application Programming Interfaces (i.e. APIs) are fine grained services/libraries used by other applications, systems and libraries. A good API design improves flexibility, stability, and extendability of your application. Now a days, applications are built as reusable components or services. …...



Why favour composition over inheritance?

This not only one of the most popular Java OOP Interview Questions & Answers asked 90% of the time in job interview, but also a key OOP concept you must know well. The correct answer depends on the problem you are trying to solve, and the answer you give reveal a lot about your know-hows &

Read more ›



800+ Java Q&As & tutorials

Top