Java Naming Conventions for Classes, Methods and Variables
Java naming conventions for packages, classes, methods, variables, constants and generics, with identifier rules, examples, a refactoring and style guides.
Java naming conventions for packages, classes, methods, variables, constants and generics, with identifier rules, examples, a refactoring and style guides.
Understand fast, independent, repeatable, self-validating and timely unit tests. Follow a Java example that controls time to check a subscription boundary.
Improve Java performance with a measurable goal, realistic baseline and focused investigation. Find bottlenecks and compare changes without guessing.
Test Java repositories with an isolated database. Check query boundaries and returned records, choose the right database and keep tests independent.
Spot eight common unit testing mistakes, including weak assertions, hidden exceptions and shared state. See focused Java examples and practical fixes.
Learn the five SOLID principles with Java examples and diagrams. Understand responsibilities, extension, substitution, interfaces and dependency direction.
Learn how ConcurrentHashMap works since Java 8, with atomic merge and compute methods, caching, bulk operations, newKeySet, sizing and common mistakes.
Handle Java exceptions clearly. Preserve causes, close resources, choose useful catch blocks, retry safely and respect interruption with practical examples.
Java serialization explained with Serializable, serialVersionUID, transient fields, records, readObject, Externalizable and deserialization filters.
Write useful Java unit tests with JUnit. Learn clear assertions, boundary cases, independent setup, test doubles, exception checks and coverage limits.
How to write custom exceptions in Java with cause constructors, a sealed hierarchy, context fields, JUnit tests and the common mistakes to avoid.
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.