Alshifa Hasnain has Published 218 Articles

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

Alshifa Hasnain

Alshifa Hasnain

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

980 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

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

952 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

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

Alshifa Hasnain

Alshifa Hasnain

Updated on 12-Jun-2025 16:00:14

10K+ Views

In this article, we will learn to use the readAllBytes() method of InputStream in Java 9. We will get to know the readAllBytes() method with its syntax, then we will learn about the InputStream Class with its methods, and lastly, we will learn the use of readAllBytes() with an ... Read More

How to get dates using LocalDate.datesUntil() method in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 12-Jun-2025 15:58:17

2K+ Views

In this article, we will learn to get dates using the LocalDate.datesUntil() method in Java 9. We will learn about date ranges, skip or limit results and by using the Period class we will apply the custom steps. What is a LocalDate? LocalDate is a part of java.time package and is ... Read More

How to get all children of a process using Process API in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 12-Jun-2025 15:53:54

2K+ Views

In this article, we will learn to get all children of a process using Process API in Java 9. First, we will learn about Process API and its methods, ProcessHandle interface and after that we will use the children method of the ProcessHandle interface. Process API In Java, the Process API, we ... Read More

What is the use of the Optional.stream() method in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Jun-2025 17:28:34

2K+ Views

In this article, we will learn about the use of the Optional.stream() method in Java 9. First, we will learn about the optional class and its method. Then we will see the use cases along with an example.Optional class The Optional class was introduced in Java 8 to reduce the ... Read More

What is the JLink tool in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Jun-2025 17:27:20

552 Views

What is JLink? Java Linker is a new linker tool that has been used to create our own customized JRE. Usually, we can run our program using default JRE provided by Oracle. If we need to create our own JRE then use this tool. JLink tool can help to create its own ... Read More

How to create scratch variables in JShell in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Jun-2025 17:24:31

413 Views

JShell is a REPL interactive tool introduced in Java 9 to execute and evaluate simple Java programs like variable declarations, statements, expressions, and programs without using the main() method.In this article, we will learn to create scratch variables in JShell in Java 9. Variables in JShell In Java 9, JShell ... Read More

How to define control flow statements in JShell in Java 9?

Alshifa Hasnain

Alshifa Hasnain

Updated on 11-Jun-2025 13:54:07

416 Views

In this article, we will learn about the control flow statements in JShell in Java. JShell is a new interactive command-line tool introduced in Java 9. This tool can also be called REPL (Read-Eval-Print-Loop) because it takes input, evaluates it, and returns output to the user via the command line.  ... Read More

Advertisements