Linked List in Java

Linked List in Java

Linked List in Java is a Collection class and it implements the doubly linked list data structure. LinkedList class in Java extends an abstract class...

Array Vs ArrayList

Array Vs ArrayList in Java

Both Array and ArrayList are very important and frequently used data structures in Java. The main difference between Array Vs ArrayList is that Array is...

Java Iterator

Java Iterator examples

Here are few Java Iterator examples for your reference. Below are the three ways to iterate a List or Set in Java – iterator.hasNext()iterator.forEachRemaining() methodListIterator 1....

convert Iterator to Stream Java

Convert Iterator to Stream – Java 8

There are 2 ways to convert an Iterator to Stream in Java 8 – Use StreamSupport.stream to convert Iterator into a StreamUse StreamSupport.stream with Spliterator parameter 1. Iterator to Stream The Iterator interface has no spliterator() method. We...

Get Current Date and Time Java

Get Current Date and Time – Java 8 Examples

Java provides many useful ways to get current date time, current date, or current time using newly introduced LocalDate, LocalDateTime and ZonedDateTime classes in Java 8 Date/Time API classes. In this article, I will show you how to...

Java 8 forEach Examples

Java 8 forEach Examples

Java 8 has added a new way to iterate over List or Collection, by using the new forEach() method of the new Stream class. You...

Get File Size in Java

How to get file size in java?

In Java, we can determine the size of a file with File, FileChannel, and Files. If you are using Java 7 or greater, it is recommended to you...

Java

ExecutorService in Java [Create ThreadPool Examples]

Table Of Content Introduction Java ExecutorService Implementations Creating ExecutorService Creating with Executors Factory Methods Directly create an ExecutorService ExecutorService Usage execute(Runnable) submit(Runnable) submit(Callable) invokeAny() invokeAll()...