{"id":13412,"date":"2022-09-02T12:16:51","date_gmt":"2022-09-02T12:16:51","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=13412"},"modified":"2022-09-05T07:26:11","modified_gmt":"2022-09-05T07:26:11","slug":"javase-18","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=13412","title":{"rendered":"JavaSE 18"},"content":{"rendered":"<p><!-- ------------------------------------------------------------------------------------------------ --><\/p>\n<h1>Wikipedia<\/h1>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Java_(programming_language)\">Java (programming language)<\/a><br \/>\n<a href=\"https:\/\/de.wikipedia.org\/wiki\/Java_(Programmiersprache)\">Java (Programmiersprache)<\/a><\/p>\n<p><!-- ------------------------------------------------------------------------------------------------ --><\/p>\n<h1>OpenJDK<\/h1>\n<p><a href=\"https:\/\/openjdk.org\/projects\/jdk\/17\/\">JDK 17<\/a><\/p>\n<p><!-- ------------------------------------------------------------------------------------------------ --><\/p>\n<h1>Tutorials<\/h1>\n<h3>baeldung<\/h3>\n<p><a href=\"https:\/\/www.baeldung.com\/oracle-jdk-vs-openjdk\">Differences Between Oracle JDK and OpenJDK<\/a><br \/>\n<a href=\"https:\/\/www.baeldung.com\/graal-java-jit-compiler\">Deep Dive Into the New Java JIT Compiler \u2013 Graal<\/a><\/p>\n<p><!-- ------------------------------------------------------------------------------------------------ --><\/p>\n<h1>YouTube<\/h1>\n<h3>Java<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=P7SI9mLwiqw\">Java 8 to 18: Most important changes in the Java Platform<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=UG9nViGZCEw\">Java 19 &#8211; The Best Java Release? &#8211; Inside Java Newscast #27<\/a><\/p>\n<p>Removed<\/p>\n<ul>\n<li>Access to JDK internals<\/li>\n<li>JAXB \/ JAXWS \/ CORBA<\/li>\n<li>Nashorn JS Engine<\/li>\n<li>CMS Garbage Collector<\/li>\n<li>ParallelScavenge+ Serial Old GC<\/li>\n<li>Launch-Time JRE version selection<\/li>\n<li>JVM TI hprof Agent<\/li>\n<li>jhat tool<\/li>\n<li>Native-Header Generation tool (javah)<\/li>\n<li>Pack200<\/li>\n<li>Solaris and SPARC Ports<\/li>\n<li>RMI Activation<\/li>\n<li>Demos and Samples<\/li>\n<\/ul>\n<p>Deprecated<\/p>\n<ul>\n<li>Biased Locking<\/li>\n<\/ul>\n<p>Deprecated-for-removal<\/p>\n<ul>\n<li>Applet API<\/li>\n<li>SecurityManager<\/li>\n<li>Value Based Classes constructors<\/li>\n<li>Finalization<\/li>\n<\/ul>\n<p>No Longer in Oracle JDK<\/p>\n<ul>\n<li>JavaFX<\/li>\n<li>Java Web Start<\/li>\n<li>JRE (and Auto update)<\/li>\n<li>32-bit<\/li>\n<\/ul>\n<p>Failed experiments<\/p>\n<ul>\n<li>AOT Compiler (9 to 17)<\/li>\n<li>JIT Compiler (10 to 17)<\/li>\n<\/ul>\n<p>Improving the Java Programming Language<\/p>\n<ul>\n<li>Local-Variable Type Inference &#8211; var<\/li>\n<li>Local Variable Syntax for Lambda Parameters<\/li>\n<li>Switch Expressions<\/li>\n<li>Text Blocks<\/li>\n<li>Records \/ Record Classes\/li>\n<li>Pattern Matching for instanceof<\/li>\n<li>Sealed Classes<\/li>\n<li>Pattern Matching for switch<\/li>\n<\/ul>\n<h4>Local-Variable Type Inference &#8211; var<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nvar url = new URL(&quot;http:\/\/www.openjdk.com\/&quot;);\r\nvar con = urk.openConnection();\r\nvar is = new InputStreamReader(con.getInputStream());\r\nvar reader = new BufferedReader(is);\r\n<\/pre>\n<h4>Switch Expressions<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nreturn switch(day) {\r\n  case MONDAY, FRIDAY, SUNDAY -&gt; 6;\r\n  case TUESDAY                -&gt; 7;\r\n  case THURSDAY, SATURDAY     -&gt; 8\r\n  case WEDNESDAY              -&gt; 9;\r\n};\r\n<\/pre>\n<h4>Text Blocks<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nvar html += &quot;&quot;&quot;\r\n  &lt;tr&gt;\r\n    &lt;td&gt;Retweets: %s&lt;\/td&gt;\r\n    &lt;td&gt;Likes: %s&lt;\/td&gt;\r\n  &lt;\/tr&gt;\r\n&quot;&quot;&quot;.formatted(t.getRetweetCount(),\r\n              t.getLikeCount());\r\n<\/pre>\n<h4>Records \/ Record Classes<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nrecord Point (int x, int y) {}\r\n<\/pre>\n<h4>Pattern Matching for instanceof<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nif (obj instance of String s) {\r\n    \/\/ String s = (String) obj not necessary anymore\r\n}\r\n&#x5B;\/code]\r\n\r\n&lt;h4&gt;Sealed Classes&lt;\/h4&gt;\r\n&#x5B;java]\r\npublic abstract sealed class Shape permits Circle, Rectangle, Square {...}\r\n\r\npublic final class Circle extends Shape {...}\r\n\r\npublic sealed class Rectangle extends Shape permits TransparentRectangle,\r\n                                                    FilledRectangle {...}\r\npublic final class TransparentRectangle extends Rectangle {...}\r\npublic final class FilledRectangle extends Rectangle {...}\r\n\r\npublic non-sealed class Square extends Shape {...}\r\n<\/pre>\n<h4>Pattern Matching for switch<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nstatic String formatterPatternSwitch(Object o) {\r\n  return switch(o) {\r\n    case Integer i -&gt; String.format(&quot;int %d&quot;, i);\r\n    case Long l    -&gt; String.format(&quot;long %d&quot;, l);\r\n    case Double d  -&gt; String.format(&quot;double %f&quot;, d);\r\n    case String s  -&gt; String.format(&quot;String %s&quot;, s);\r\n    default        -&gt; o.toString();\r\n  };\r\n}\r\n<\/pre>\n<h4>Pattern Matching for switch &#8211; Matching null<\/h4>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nstatic String formatterPatternSwitch(Object o) {\r\n  return switch(o) {\r\n    case null      -&gt; &quot;null&quot;;\r\n    case Integer i -&gt; String.format(&quot;int %d&quot;, i);\r\n    case Long l    -&gt; String.format(&quot;long %d&quot;, l);\r\n    case Double d  -&gt; String.format(&quot;double %f&quot;, d);\r\n    case String s  -&gt; String.format(&quot;String %s&quot;, s);\r\n    default        -&gt; o.toString();\r\n  };\r\n}\r\n<\/pre>\n<h3>Keso Rupert<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=yz9IaxjT4V0\">All Java 18 Features In Under 5 Minutes!<\/a><\/p>\n<ul>\n<li>400: UTF-8 by Default<\/li>\n<li>408: Simple Web Server<\/li>\n<li>413: Code Snippets in Java API Documentation<\/li>\n<li>416: Reimplement Core Reflection with Method Handles<\/li>\n<li>417: Vector API (Third Incubator)<\/li>\n<li>418: Internet-Address Resolution SPI<\/li>\n<li>419: Foreign Function &#038; Memory API (Second Incubator)<\/li>\n<li>420: Pattern Matching for switch (Second Preview)<\/li>\n<li>421: Deprecate Finalization for Removal<\/li>\n<\/ul>\n<p><!-- ------------------------------------------------------------------------------------------------ --><\/p>\n<h1>History<\/h1>\n<table class=\"wikitable\">\n<tbody>\n<tr>\n<th>Version<\/th>\n<th>Date\n<\/th>\n<\/tr>\n<tr>\n<td>JDK Beta<\/td>\n<td>1995\n<\/td>\n<\/tr>\n<tr>\n<td>JDK 1.0<\/td>\n<td>January 23, 1996<\/td>\n<\/tr>\n<tr>\n<td>JDK 1.1<\/td>\n<td>February 19, 1997\n<\/td>\n<\/tr>\n<tr>\n<td>J2SE 1.2<\/td>\n<td>December 8, 1998\n<\/td>\n<\/tr>\n<tr>\n<td>J2SE 1.3<\/td>\n<td>May 8, 2000\n<\/td>\n<\/tr>\n<tr>\n<td>J2SE 1.4<\/td>\n<td>February 6, 2002\n<\/td>\n<\/tr>\n<tr>\n<td>J2SE 5.0<\/td>\n<td>September 30, 2004\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 6<\/td>\n<td>December 11, 2006\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 7<\/td>\n<td>July 28, 2011\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 8 (LTS)<\/td>\n<td>March 18, 2014\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 9<\/td>\n<td>September 21, 2017\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 10<\/td>\n<td>March 20, 2018\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 11 (LTS)<\/td>\n<td>September 25, 2018\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 12<\/td>\n<td>March 19, 2019\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 13<\/td>\n<td>September 17, 2019\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 14<\/td>\n<td>March 17, 2020\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 15<\/td>\n<td>September 15, 2020\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 16<\/td>\n<td>March 16, 2021\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 17 (LTS)<\/td>\n<td>September 14, 2021\n<\/td>\n<\/tr>\n<tr>\n<td>Java SE 18<\/td>\n<td>March 22, 2022\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Wikipedia Java (programming language) Java (Programmiersprache) OpenJDK JDK 17 Tutorials baeldung Differences Between Oracle JDK and OpenJDK Deep Dive Into the New Java JIT Compiler \u2013 Graal YouTube Java Java 8 to 18: Most important changes in the Java Platform Java 19 &#8211; The Best Java Release? &#8211; Inside Java Newscast #27 Removed Access to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/13412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13412"}],"version-history":[{"count":10,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/13412\/revisions"}],"predecessor-version":[{"id":13447,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/13412\/revisions\/13447"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}