Java 18 Features

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


โ‘  ๐—ฆ๐—ถ๐—บ๐—ฝ๐—น๐—ฒ ๐—œ๐—ป๐—ฏ๐˜‚๐—ถ๐—น๐˜ ๐—ช๐—ฒ๐—ฏ ๐—ฆ๐—ฒ๐—ฟ๐˜ƒ๐—ฒ๐—ฟ โœ…

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.

โ‘ก ๐—จ๐—ง๐—™-๐Ÿด ๐—ฏ๐˜† ๐——๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜ โœ…

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

โ‘ข ๐—–๐—ผ๐—ฑ๐—ฒ ๐—ฆ๐—ป๐—ถ๐—ฝ๐—ฝ๐—ฒ๐˜๐˜€ ๐Ÿ“

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

โ‘ฃ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ป๐—ฒ๐˜-๐—”๐—ฑ๐—ฑ๐—ฟ๐—ฒ๐˜€๐˜€ ๐—ฅ๐—ฒ๐˜€๐—ผ๐—น๐˜‚๐˜๐—ถ๐—ผ๐—ป ๐—ฆ๐—ฃ๐—œ โœ…

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

โ‘ค ๐—ฃ๐—ฎ๐˜๐˜๐—ฒ๐—ฟ๐—ป ๐— ๐—ฎ๐˜๐—ฐ๐—ต๐—ถ๐—ป๐—ด ๐—ณ๐—ผ๐—ฟ ๐˜๐—ต๐—ฒ ๐˜€๐˜„๐—ถ๐˜๐—ฐ๐—ต โœ…

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.

โ‘ฅ ๐—ฉ๐—ฒ๐—ฐ๐˜๐—ผ๐—ฟ ๐—”๐—ฃ๐—œ โœ…

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.

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

#java #java18 #features #mode