Best Practices

Testing the DAO Layer in Java

Test Java repositories with an isolated database. Check query boundaries and returned records, choose the right database and keep tests independent.

8 Signs of Poorly Written Unit Tests

Spot eight common unit testing mistakes, including weak assertions, hidden exceptions and shared state. See focused Java examples and practical fixes.

SOLID Principles in Java With Examples

Learn the five SOLID principles with Java examples and diagrams. Understand responsibilities, extension, substitution, interfaces and dependency direction.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.