Example of a Java ZIP file folder

Today we’re going to look at a sample Example of a Java ZIP file folder. We will also compress a folder and create a zip file using the Java program. Java ZIP java.util.zip.ZipOutputStream can be used to compress a file in ZIP format. A ZIP file can carry multiple entries and ZipOutputStream uses java.util.zip.ZipEntry to […]

Java Inner Class

The inner Java class defines the body of another class. The inner class can define as private, public, secure, or with standard access, while an outer class can only have public or standard access. Therefore the Java nested classes have two types. 1. Static nested class If the nested class is static then it is […]

Java8 Core API Improvements

In this article, we will learn about the Java8 Core API Improvements. A few different API improvements that might come in handy includes Static ThreadLocal with Initial method (Provider provider) to easily create instances. The user interface improves with many standard and static modes for natural layout, inverted layout, etc. Therefore min(), max(), and sum() […]

Java ThreadLocal example

Java Thread Local use to generate local thread settings. We know that all threads on an object share its variable, so the variable thread is not safe. We can also use sync to protect the variable. Alternatively, we can use thread local variables to prevent synchronization and we learn about the Java ThreadLocal example. Each […]

Java 8 Features with Examples

In this article, we will take a look at Java 8 Features with Examples. Java 8 features Overview Some of the key features of Java 8 are forEach() method in the Iterable interface Standard and static methods in interfaces Functional interfaces and lambda expressions Java Stream API for bulk data operations for collections Java time […]

NIO Read File Java Example

Learn how to use the Java NIO APIs to read a file from the file system using buffer, channel, and path classes. In this article, we will learn about NIO Read File Java Example. 1. FileChannel and ByteBuffer for reading small files Use this technique to read a small file where all of the contents […]

Begin typing your search term above and press enter to search. Press ESC to cancel.