Java 8 Watchservice Example, easy in 10 minutes

Today, We walk you through a Java 8 Watchservice Example in easy steps. You will know how to watch a directory along with subdirectories and files inside there. Beside, we implement a full java program that demonstrates all watched events like ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY. Now, let’s dig into it. Java 8 Watchservice Example Register a … Read moreJava 8 Watchservice Example, easy in 10 minutes

Java Autoboxing Performance Impact

This post will introduce you to Java Autoboxing Performance Impact. Java provides the Autoboxing technique that helps developers write code cleaner and easier to read. But it also brings to use some impact of performances. If you are not familiar with the Java Autoboxing technique you can have a look at the tutorial¬† Autoboxing and … Read moreJava Autoboxing Performance Impact

Autoboxing and Unboxing Java Example

This post introduces about autoboxing and unboxing java example. Autoboxing and unboxing lets developers write cleaner code, making it easier to read. Because this technique let us use primitive types and Wrapper class objects together and no need to care about typecasting explicitly. Let’s discover now. Autoboxing and Unboxing Java Example Autoboxing in Java Autoboxing … Read moreAutoboxing and Unboxing Java Example

Java 8 NullPointerException in Collectors.toMap

Today, Let’s discuss about the Java 8 NullPointerException in Collectors.toMap. The Java 8 Collectors.toMap throws a NullPointerException if one of the values is ‘null’. This error make developers confused and don’t know why this behavior happens, although maps can contain null pointers as value without any problems. Is there a good reason why values cannot … Read moreJava 8 NullPointerException in Collectors.toMap

Java 8 filter map example, by key and by value

Today, I show you about the Java 8 filter map example which filters a map by value and filters a map by key. Here we will use Stream filter() method to filter a Map by keys and values. The core jdk lacks the mechanics for filtering a map by Map.entry until Java 8. Let’s begin: … Read moreJava 8 filter map example, by key and by value

Please share it if you found this useful
Hide Buttons