Best Practices

java 8

Java Naming Conventions

Java naming conventions are sort of guidelines that application programmers are expected to follow to produce consistent and readable code throughout the application. If teams do not follow these conventions, they may collectively write an application code that is hard to read and difficult to understand. Always try to give descriptive and concise names to …

Spring version-less schema for latest version

If you have worked on Spring framework projects, then you must have seen spring context configuration files (e.g. applicationContext.xml) where in header you specify the schema references (.xsd) for various spring modules. In schema references, we mention the xml namespace and as well as schema version number. Well specifying schema …

A Comprehensive Guide to SOLID Principles

Learn SOLID principles in Java with examples. Single Responsibility Principle, Open Closed Principle, Liskov’s Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle.

Comparing Performance of Java Loops

This Java article compares the performance of an ArrayList iteration using simple for-loop, enhanced for-loop, list iterator and stream API.

Unit Testing Best Practices

It is overwhelmingly easy to write bad unit tests that add very little value to a project while astronomically inflating the cost of code changes. This post will go through the JUnit best practices we must consider while writing the test cases. In programming, “Unit testing is a method by …

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.