- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Raja has Published 760 Articles
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
527 Views
There are two new parameters or attributes added to @Deprecated annotation in Java 9. Those parameters are Since and forRemoval, both of these two parameters are optional with a default value when we can't specify it.SinceThis string parameter specifies the version in which the API became deprecated. The default value of this element is ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
202 Views
JShell can also provide an auto-completion feature when we partially type the name of an existing class, variable, or method by pressing the Tab key. If an item can't determine from what we entered, then possible options are provided.Pressing the Tab key in JShell performs one of the following tasks:If no other name matches what ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
341 Views
In Java 9, several factory methods have added to Collections API. By using these factory methods, we can create unmodifiable list, set and map collection objects to reduce the number of lines of code. The List.of(), Set.of(), Map.of() and Map.ofEntries() are the static factory methods that provide convenient way of creating immutable collections in Java 9.Benefits ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
335 Views
Java Shell or JShell is an official REPL(Read-Evaluate-Print-Loop) introduced with Java 9. It provides an interactive shell for quickly prototyping, debugging and without the need for the main() method or without the need to compile the code before executing it. JShell is easily started by typing "jshell" in the command prompt. Save a snippetWe can ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
143 Views
The immutable static factory method Set.of() can provide a convenient way to create unmodifiable sets in Java 9. An instance of a set created by using the Set.of() method has the following characteristics.The set returned by a factory method is conventionally immutable. It means that elements can't be added, removed, or replaced from a ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
355 Views
A list considered to be unmodifiable if the elements can't be added, removed, or replaced from a list once an unmodifiable instance of a list has created. The static factory method: List.of() provides a convenient way to create unmodifiable lists in Java 9.An instance of a list created by using the List.of() method ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
263 Views
An unmodifiable Map is one whose keys and values can't be added, removed, or updated once an unmodifiable instance of a map has created. The static factory methods: Map.of() and Map.ofEntries() from Map that provides a convenient way to create unmodifiable maps in Java 9.An instance of a map created by using Map.of() ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
1K+ Views
The ofNullable() method is a static method of Stream class that returns a sequential Stream containing a single element if non-null, otherwise returns an empty. Java 9 has introduced this method to avoid NullPointerExceptions and also avoid null checks of streams. The main objective of using the ofNullable() method is to return an empty ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
1K+ Views
Both orTimeout() and completeOnTimeOut() methods are defined in CompletableFuture class and these two methods are introduced in Java 9. The orTimeout() method can be used to specify that if a given task doesn't complete within a certain period of time, the program stops execution and throws TimeoutException whereas completeOnTimeOut() method completes the ... Read More
![raja](https://www.tutorialspoint.com/assets/profiles/107595/profile/60_161286-1564642329.jpg)
raja
356 Views
In Java 8, the iterate() method of Stream API takes the seed and the unary operator as arguments. As stream becomes infinite, it makes the developer add explicit termination conditions by using limit, findFirst, findAny and etc. In Java 9, the iterate() method of Stream API has added a new argument, a predicate that takes the condition to break ... Read More