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

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 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

Java 8 List to Map duplicate keys

Today, I introduce you to Java 8 List to Map duplicate keys examples. Here, we will use Collectors.toMap() method to convert a List of an object into a Map. One more thing, If List has duplicates but Map doesn’t allow duplicate keys. When you are converting List to Map and what will happen? Let’s discovery … Read moreJava 8 List to Map duplicate keys

Please share it if you found this useful
Hide Buttons