Alshifa Hasnain has Published 283 Articles

Difference between HashTable and ConcurrentHashMap in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 27-Jun-2025 18:11:39

8K+ Views

In this article, we will learn about the ConcurrentHashMap and HashTable in Java. First, we will know about ConcurrentHashMap, the syntax of ConcurrentHashMap, and an example after that will learn about HashTable, the syntax of HashTable, and an example. At the end, we will see a table showing the difference ... Read More

How to get the date and time in JShell in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 17-Jun-2025 16:27:12

539 Views

In this article, we will learn to get the date and time in JShell in Java 9. First, we will learn about the date and time class in Java with an example, and after that will learn about date and time in JShell with multiple examples. JShell JShell is an ... Read More

How to use the collect() method in Stream API in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:42:10

2K+ Views

In this article, we will learn to use the collect() method in the Stream API in Java 9. Java Stream API collect() Method In Java, the collect() method in the Stream API collects all objects from a stream object and stores them in a type of collection. The user ... Read More

Difference between EnumMap and HashMap in Java

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:40:48

905 Views

In this article, we will learn about the EnumMap and HashMap in Java. First, we will know about EnumMap, the syntax of EnumMap, and an example after that will learn about HashMap, the syntax of HashMap, and an example. At the end, we will see a table showing the difference ... Read More

What is Unified JVM Logging in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:36:39

533 Views

In this article, we will learn about the unified JVM logging in Java 9. Logging in the JVM is a great tool for performing root cause analysis, and it is a part of the JDK(Java Development Kit). Starting from JDK 9, the JVM maintainers chose to rebuild the way the ... Read More

How to access each stack element of StackWalker in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:35:18

244 Views

In this article, we will learn to access each stack element of StackWalker in Java 9. We will learn about the StackWalker API and its methods, and use of getStackTrace() method for accessing each stack element. StackWalker API StackWalker API allows easy filtering and lazy access to execute tasks within any ... Read More

What is the use of the toEpochSecond() method in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:33:50

841 Views

In this article, we will learn about the use of the toEpochSecond() method in Java 9. First, we will learn about the LocalDate class, its methods, then we will know about the Epoch Time and the toEpochSecond() method with its uses and example in Java. LocalDate Class The LocalDate class ... Read More

When to use the delayedExecutor() method of CompletableFuture in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 16-Jun-2025 16:32:44

4K+ Views

In this article, we will learn to use the delayedExecutor() method of CompletableFuture in Java 9. We're gonna know about the delayedExecutor() method and also the CompletableFuture class, as this method belongs to this class, and we're gonna know the uses of the delayedExecutor() method along with an example. CompletableFuture ... Read More

When to use the readNBytes() method of InputStream in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 12-Jun-2025 17:36:13

2K+ Views

In this article, we will learn to use the readNBytes() method of InputStream in Java 9. We will get to know the InputStream Class with its methods as readNBytes() is a method of this class. After that, we will learn about the readNBytes() method with its syntax and when to use ... Read More

How to get the parent process of the Process API in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 12-Jun-2025 17:32:47

838 Views

In this article, we will learn to get the parent process of the Process API in Java 9. First, we will know about Process API and its methods, after that we will learn about the ProcessHandle interface. Process API In Java, the Process API, we can perform any operation regarding ... Read More

Advertisements