Java 18 Features

โœ Wow, ๐—๐—ฎ๐˜ƒ๐—ฎ ๐Ÿญ๐Ÿด has some ๐—ฎ๐˜„๐—ฒ๐˜€๐—ผ๐—บ๐—ฒ ๐—ณ๐—ฒ๐—ฎ๐˜๐˜‚๐—ฟ๐—ฒ๐˜€ ๐Ÿš€, listed below are the important things.๐Ÿ”ฅ

โœ Simple Web Server โœ…

Nowadays most modern languages have inbuilt web servers. Java 18 comes with that feature. We can start providing a web server with the jwebserver command. It starts the server on localhost:8000 and provides a file browser for the current directory.

โœ UTF-8 By Default

In Java 18, the default charset is now UTF-8. Previously, Java charset worked based on the host operating system and locale.

โœ Code Snippets

Now, we can implement and integrate multiline code snippets into Java. It helps a lot for the predefined example or getting started code.

โœ Internet-Address Resolution SPI

Helps to resolve Internet address items and can use this to resolve hostnames from IP addresses or hostnames and ports from an HTTP URI

โœ Pattern Matching for Switch

It was first introduced in Java 17. Pattern Matching for switch enables and transfers control to one of the several statements or expressions, depending on the value of its selector expression.

โœ Vector API

A vector API makes simply an array of numbers that can be manipulated as a single entity and helps to perform numeric computations, especially complex ones that involve many different values.

Note : ๐Ÿ”” Some of the features are available in preview mode.


#java #java18 #features #mode