Pattern Matching in instanceof
Bye Bye Explicit casts

Search for a command to run...
Articles tagged with #java
Bye Bye Explicit casts

Switches in Java lacked an option to match a value based on an expression that is computed at runtime(similar to C). So the values against which a value can be matched should be constant known at compile time. Below is the current format of switch th...

Polymorph a step better

Immutable data carriers

Parallelization is being done to use the number of cores available in servers and to reduce the time taken for execution. But if race condition isn't handled properly for required variables, it could create unexpected issues in our application. First...

Consider this situation, a class named EmployeeList which reads a list of employee names from files public class Employee { ... List<Employee> getEmployeesJoinedAfterYear(int year) { String content = readFromFile("employees.txt"); ...
