Raja has Published 469 Articles

Importance of Collectors.flatMapping() method in Java 9?

raja

raja

Updated on 05-Mar-2020 10:58:50

512 Views

In Java 9, a new method added to the Collectors class: flatMapping(). It is similar to the Collectors.mapping() method in which the flatMapping() method allows us to handle nested collections. The Collectors.flatMapping() method takes a function to be applied to input elements and a collector to accumulate the elements passed ... Read More

Importance of the Collectors.filtering() method in Java 9?

raja

raja

Updated on 05-Mar-2020 09:45:18

393 Views

Collectors class is an essential part of the Stream API. In Java 9, a new method: filtering() added to the Collectors class. The Collectors.filtering() method can be used for filtering elements in a stream. It is similar to the filter() method on streams. The filter() method processes the values before they have grouped whereas ... Read More

How to create JShell instance programmatically in Java 9?

raja

raja

Updated on 04-Mar-2020 14:06:19

512 Views

JShell is an interactive tool introduced since Java 9. It is Java's first official REPL tool to create a simple programming environment in the command-line that reads the user's inputs, evaluates it, and prints the result.We can able to create a new JShell instance programmatically in Java language. JShell and its associated APIs ... Read More

What is Project Jigsaw in Java 9?

raja

raja

Updated on 04-Mar-2020 08:16:00

942 Views

The primary objective of the Jigsaw project is to introduce the modularity concept to create a module in Java 9 and then applying the same to JDK.Below are some of the benefits of Modularity(Jigsaw)Strong Encapsulation: The modules can access only those parts that can be available for use. Unless the ... Read More

Importance of transferTo() method of InputStream in Java 9?

raja

raja

Updated on 26-Feb-2020 13:20:24

2K+ Views

The transferTo() method has been added to the InputStream class in Java 9. This method has been used to copy data from input streams to output streams in Java. It means it reads all bytes from an input stream and writes the bytes to an output stream in the order in ... Read More

What are the benefits of a module in Java 9?

raja

raja

Updated on 26-Feb-2020 10:04:14

689 Views

An important feature introduced in Java 9 is Module. By using a module, we can divide the code into smaller components called modules. It means each module has its own responsibility and declare its dependency on other modules to work correctly.Below are the steps to create a modular project in ... Read More

What are the characteristics of a module in Java 9?

raja

raja

Updated on 26-Feb-2020 05:01:28

336 Views

The module is a collection of code, data, and resources. It is a set of related packages and types like classes, abstract classes, and interfaces with code, data files, and some static resources.Below are some of the characteristics of a module.Characteristics of a module:A module must define an interface for communication with other modules.A ... Read More

What is an OutOfMemoryError and steps to find the root cause of OOM in Java?

raja

raja

Updated on 24-Feb-2020 11:27:10

2K+ Views

The OutOfMemoryError is thrown by JVM, when JVM does not have enough available memory, to allocate. OutOfMemoryError falls into the Error category in Exception class hierarchy.To generate OutOfMemoryErrorWe will allocate a large chunk of memory, which will exhaust heap memory storage.We will keep on allocating the memory and point will reach, when JVM ... Read More

Explain the architecture of Java Swing in Java?

raja

raja

Updated on 24-Feb-2020 11:08:53

3K+ Views

Java Swing is a set of APIs that provides a graphical user interface (GUI) for the java programs. The Java Swing was developed based on earlier APIs called Abstract Windows Toolkit (AWT). The Java Swing provides richer and more sophisticated GUI components than AWT. The GUI components are ranging from ... Read More

How many non-access modifiers are there in Java?

raja

raja

Updated on 24-Feb-2020 08:07:53

233 Views

Java provides some other modifiers to provide the functionalities other than the visibility. These modifiers are called Non-Access ModifiersStatic  The members which are declared as static are common to all instances of a class. Static members are class level members which are stored in the class memory.Final  This modifier is ... Read More

Advertisements