The Concurrency API introduces the concept of an ExecutorService as a higher level replacement for working with threads directly. Executors are capable of running asynchronous tasks and typically manage a pool of threads, so we don't have to create new threads manually. …

Coding best practices are a set of informal rules that helps improve the quality of a product. It is also a key to maintainability and working together with a team. Idea of this document is to focus on basic principles and practical techniques you can apply every time you write code.

  1. Follow Clean code principles: Clean code doesn’t rely on language-specific rules. Instead, it relies on language-agnostic principles agreed upon by the developer community. Below are the some of the general design principles of clean code:
  • KISS:- Keep it simple stupid. Principle is to keep the code simple and clear, making…

In Java everything is encapsulated under classes. Codes cannot exist outside of a class (JShell, Its Different) . I have listed here top 10 Java classes which are the part of JDK itself. These classes are popular and useful for programmers to write clean and maintainable code. …

How to Embrace local variable type inference “var” in Java

int i = 10; This is the standard variable declaration in java, you have got the variable type here int followed by variable name and then an assignment to the value 10. …

Sanjeev Kumar Rai

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store