What are Java Records and Why it is so important?

Java records are a special type of immutable class which is used for data carrier. It reduces so much boilerplate code so that performance of carrying data between modules and classes especially for POJO (Plain Old Java Objects) and DTO (Data Transfer Object) is fast. What are Java Records? The main objective of java records … Read more

What is a sealed class in Java?

A class which is declared as sealed in java. Basically sealed class restricts which class need to be extended and which class don’t. Sealed class cannot be inherited, but it can be instantiated. ‘permits’ is a keyword which allows to restrict subtypes of a sealed class. What does really sealed class means? Literally, When you … Read more

Java var keyword best practice

java var keyword best practice

In Latest version of Java programming language var keyword is widely used because any assigned value to var variable automatically scans the data type and then able to operate. The best practice of var keyword in java is that where inferred type is possible otherwise it would be bad practice. What is var in Java? … Read more