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