
Java 13 (JDK 13) -The New Features
Java Development Kit (JDK) 13, the latest version of standard Java, is now available and release with some new features of,
1. Switch Expressions
This is one of the preveiew language feature defined in java 13.
Java 13 extends the previous Java 12 Switch Expressions by adding a new yield keyword to return a value from switch expression.So breaks syntax is no longer compiled in Java 13, it uses yield instead.
Check switch expression with java 13.
String number=switch (number) { case 1: yield “one”; case 2: yield “two”; default : yield “Zero”; }
2.Text Blocks
This also preveiew language feature .
A text block is a multi-line string literal that automatically formats the string in a predictable manner and gives developers control over the format.This is a new syntax you get in JDK 13.
This enhances the readability of strings in programs that denote code written in non Java languages and allow a better way of writing, and more importantly reading, multi-line text inside Java code.
As an example ,
//multi-line string literal before Java 13 String html ="<html>\n" + " <body>\n" + " <p>Hello, World</p>\n" + " </body>\n" + "</html>\n"; //new multi-line string literal String html = """ <html> <body> <p>Hello, World</p> </body> </html> """;
3.Dynamic CDS Archives
Application class-data sharing (AppCDS) was available in Java 10 and improved in Java 12 and 13. The idea behind AppCDS is to create a class-data archive once and then share it, so that the JVM not need to recreate it. It reduces launch times and response time by moving much of the class-loading work out of the program run. Instead of loading class data from JARs when it’s needed.
Java 10 this happen through the three steps of creating a list of classes to archive , creating the archive and launching with the archive. Java 12 introduce a default archive of JDK classes that is shipped with the JVM and used automatically.
But in Java 13,
Extending AppCDS to enable dynamic archiving of classes at the end of application execution. Archived classes would include all loaded application and library classes not present in the default, base-layer CDS archive. The new option -XX:ArchiveClassesAtExit tells the JVM to run as usual, but at the end of execution write the class-data into the specified file. This file can be used to run the application with the archive CDS.
//run without CDS & create archive $ java -XX:ArchiveClassesAtExit=hello.jsa -cp hello.jar Hello
//use created an archive (To run the program with the CDS archive above) $ bin/java -XX:SharedArchiveFile=hello.jsa -cp hello.jar Hello
4.ZGC: Uncommit Unused Memory
The Z Garbage Collector (ZGC) is a scalable low-latency garbage collector introduced in Java 11, it provides a short pause times when cleaning up heap memories. With Java 13, ZGC enhance to return unused heap memory to the operating system.
JEP-351: ZGC: Uncommit Unused Memory
5.Reimplement the Legacy Socket API
The legacy APIs introduced with JDK 1.0 .With java 13 this replace the underlying implementation used by the java.net.Socket and java.net.ServerSocket APIs with a simpler and more modern implementation that is easy to maintain and debug. The new implementation will be easy to adapt to work with user-mode threads.
52 COMMENTS
[…] changed its release cycle more rapidly. JDK 13 released on September 2019 and JDK 14 is scheduled for a production release on 17 March 2020. The […]
pfizer viagra price An excisional biopsy removes an entire lump or suspicious area
[url=https://propranolol.run/]propranolol 20 mg cost[/url]
azithromycin for chlamydia dose So Friday March 2nd I get my bfp
Your article is a great reminder of the power of community and working together to create change. Thank you for highlighting the importance of collaboration.
Your article is a valuable resource for anyone looking to gain a deeper understanding of this topic. Thank you for sharing your knowledge.
Your article is a great reminder of the power of community and working together to create change. Thank you for highlighting the importance of collaboration.
Your writing is exceptional. I appreciate the way you present the information in a logical and easy-to-follow manner.
This article is very informative and provides a lot of insight on the topic.
I appreciate the way you include diverse perspectives and voices in your writing, making the article more inclusive and representative.
2 Chromolaena odoratum buy canadian finasteride 1 mg
Your writing is both informative and entertaining. It’s a rare combination and makes your articles stand out from the rest.
I like the way you present information in an easy to understand language.
LeanBiome is a cutting-edge supplement that offers a new approach to weight management. By targeting the root cause of weight gain – an imbalanced gut microbiome – LeanBiome provides a sustainable solution to healthy weight loss. Its unique combination of clinically-researched ‘lean bacteria’ species and Greenselect Phytosome make it a powerful and effective supplement that is backed by real-world results.
Sugar Defender transcends symptom-focused interventions, delving into the root causes of glucose imbalance. It stands as a dynamic formula that seamlessly aligns with the body’s intrinsic mechanisms, presenting a distinctive and holistic approach to enhancing overall well-being. Beyond a mere supplement, Sugar Defender emerges as a strategic ally in the pursuit of balanced health.
Your blog has quickly become one of my favorites I always look forward to your new posts and the insights they offer
canadian pharmacy online for viagra us pharmacy for cialis
canadian pharmacy without a prescription [url=http://canadianphrmacy23.com/]canadian pharmacy – viagra[/url]
I appreciate the way you use data and statistics to support your arguments. It adds credibility and depth to your writing.
I learned a lot from this article. Thanks for the detailed explanation.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Your article helped me a lot, is there any more related content? Thanks!
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/en-ZA/register?ref=JHQQKNKN
The Best Premium IPTV Service WorldWide!
I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.
UID_51866346###
Yuk, cek berita terbaru hari ini 😊📰! Gibran Kunjungi Pangkalan Gas 🚀⛽️. Selengkapnya hanya di sini, jangan sampai ketinggalan ya! 👀👍.
Dapatkan info terbaru dari Berita Dana terbaru setiap harinya.
It is really a great and useful piece of information. I’m glad that you just shared this useful information with us. Please keep us up to date like this. Thanks for sharing.
UID_30973911###
Mari simak berita terbaru ini 👀🔥 Nasib Tahanan Pasca Kebakaran Mapolsek 🚒🚓 Bagaimana kelanjutannya? Yuk, cari tahu lebih lanjut! 🕵️♂️💡
Dapatkan info terbaru dari Berita Dana terbaru setiap harinya.
UID_72942561###
Berita Hot! 🔥🔥 Isa Rachmatarwata Tersangka Kasus Jiwasraya Buntut kerugian negara hingga 16,8 Triliun! 😲😲
UID_53550706###
Berita terbaru! 🔥 Isa Rachmatarwata Ditahan Kejagung dalam kasus Jiwasraya. 🚔👮♂️
UID_57092237###
Berita gembira! 🎉 Pasokan Gas 3 Kg di Kramat Jati Kembali Normal 🎊 Siap-siap belanja gas, ya! 💪🔥
UID_72339950###
Heboh! 📣🔥 Unjuk Rasa di Polda Jatim 📢 Menuduh Jokowi Terlibat Korupsi! 😱🔍
UID_27764099###
Ini yang di ganti >>> “Bingung Kenapa 😕❓” Federasi Sepak Bola Pakistan Disanksi FIFA “Baca Penyebabnya Disini! 🧐🔍”
UID_74743238###
Ini dia! 🎉🎉 ASN BKN Ubah Pola Kerja yang baru dan efisien! 🎉🎉.
UID_83344528###
Inilah 🎉🎉 Pupuk Inovatif Kebun Riset Kujang yang bikin Wamen BUMN bangga! 💪🏻🇮🇩
Thank you for the sensible critique. Me & my neighbor were just preparing to do a little research about this. We got a grab a book from our local library but I think I learned more clear from this post. I’m very glad to see such magnificent info being shared freely out there.
UID_21891068###
Takjub 😮 dengan fenomena serbu gas? Yuk, baca Warung Tatang Diserbu Warga dan temukan faktanya! 🕵️♀️👀
UID_25978847###
situs terbaik hanya di slot gacor agentotoplay
I just wanted to post a small word so as to express gratitude to you for these fantastic techniques you are sharing here. My considerable internet lookup has now been compensated with reputable details to write about with my family and friends. I would declare that most of us website visitors are very fortunate to be in a fabulous place with many perfect people with great techniques. I feel rather grateful to have seen your website page and look forward to so many more amazing times reading here. Thanks a lot once again for all the details.
UID_95859078###
Baru-baru ini, para pemain Mahjong Wins 3 dikejutkan dengan bocoran RTP yang diklaim bisa meningkatkan peluang kemenangan secara signifikan. Banyak yang percaya bahwa informasi ini membantu mereka mendapatkan hasil yang lebih konsisten dalam permainan. Jika Anda ingin tahu lebih lanjut, cek bocoran RTP Mahjong Wins 3 hari ini dan lihat apakah strategi ini benar-benar efektif.
UID_57331425###
Skandal terbaru mengguncang komunitas pecinta game slot setelah seorang admin terkenal, Rachel, dikabarkan tertangkap membocorkan pola kemenangan Gate of Olympus. Banyak yang bertanya-tanya apakah informasi ini benar-benar akurat atau hanya sekadar rumor yang beredar di kalangan pemain. Simak lebih lanjut detailnya dalam artikel admin Rachel tertangkap bocorkan pola Gate of Olympus.
UID_17136916###
Kisah inspiratif datang dari seorang tukang ojek online asal Tangerang yang berhasil membawa pulang hadiah fantastis setelah bermain Mahjong Ways 2. Dengan modal kecil, ia sukses mengubah nasibnya dan meraih kemenangan besar senilai 200 juta rupiah. Penasaran bagaimana caranya? Simak kisah lengkapnya di artikel tukang ojek online menang 200 juta dari Mahjong Ways 2.
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
UID_18563832###
Ini yang di ganti >>> Yuk, ketahui lebih lanjut tentang Syarat Gabung OECD dan Pentingnya Ratifikasi Konvensi Antisuap di sini! 🕵️♀️🔎📚.
UID_83003169###
Kenalan yuk! 🤝 Dengan guru inspiratif ini, Guru Dede Sulaeman yang mengajarkan cara merapikan pakaian di kelasnya. 👕👚🎓
UID_97211224###
Yuk, sehat bersama! 👨⚕️👩⚕️ Cek kondisi tubuh kamu di Program Cek Kesehatan Gratis sekarang juga! 💉🌡️ Selalu jaga kesehatan, ya! 🏥💖
I truly appreciate this post. I have been looking all over for this! Thank goodness I found it on Bing. You have made my day! Thx again!
Great goods from you, man. I’ve understand your stuff previous to and you’re just too wonderful. I really like what you have acquired here, certainly like what you’re stating and the way in which you say it. You make it entertaining and you still take care of to keep it sensible. I can’t wait to read far more from you. This is actually a tremendous web site.
Your point of view caught my eye and was very interesting. Thanks. I have a question for you.
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me.