{"id":2972,"date":"2019-01-29T11:11:31","date_gmt":"2019-01-29T11:11:31","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=2972"},"modified":"2023-12-01T05:04:20","modified_gmt":"2023-12-01T05:04:20","slug":"java-version-comparison","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/java-version-comparison\/","title":{"rendered":"Java Version Comparison"},"content":{"rendered":"<p><strong>Java 7 Features<\/strong>:<\/p>\n<ol>\n<li>Usage of Strings in Switch Statement<\/li>\n<li>Diamond Operator &#8211;  the diamond operator allows you to write more compact (and readable) code by saving repeated type arguments<\/li>\n<li>Try with Resources<\/li>\n<li>Multiple Exception Handling<\/li>\n<li>Suppressed Exceptions<\/li>\n<li>Allows Binay Literals &#8211; Binary Literal are expressing Integer Values in terms of Binary Value by adding the prefix 0b or 0B to the integral value.For more on BinayLiteral click <a href=\"https:\/\/www.javatpoint.com\/java-binary-literals\">here<\/a> <\/li>\n<\/ol>\n<p><strong>Java 8 Features<\/strong>:<\/p>\n<ol>\n<li>Lambda Expressions<\/li>\n<li>Java Stream API for Bulk Data Operations on Collections.<\/li>\n<li>Static and Default method in Functional Interfaces<\/li>\n<li>forEach() method in Iterable interface<\/li>\n<li>Functional Interfaces<\/li>\n<li>Collection API improvements<\/li>\n<\/ol>\n<p><strong>Java 9 Features<\/strong>:<\/p>\n<ol>\n<li>Factory Methods for Immutable List, Set, Map and Map.Entry<\/li>\n<li>Private methods in Interfaces<\/li>\n<li>Reactive Streams<\/li>\n<li>JShell: the interactive Java REPL<\/li>\n<\/ol>\n<p><strong>Java 10 Features<\/strong>:<\/p>\n<ol>\n<li>Local-Variable Type Inference <\/li>\n<li>Application Class-Data Sharing<\/li>\n<li>default set of root Certification Authority (CA) certificates in the JDK<\/li>\n<li>Garbage Collector Interface<\/li>\n<\/ol>\n<p><strong>Java 11 Features<\/strong>:<\/p>\n<ol>\n<li>Java 11 JDK is not free for usage on commercial purpose <\/li>\n<li>No need to compile.typing >>Java in command prompt will compile and run java  <\/li>\n<li>Remove the Java EE and CORBA Modules &#8211; <\/li>\n<li>Java String Methods &#8211; isBlank(), lines(), strip(), stripLeading(), stripTrailing()<\/li>\n<\/ol>\n<p><strong>Java 17 Features<\/strong>:<\/p>\n<ol>\n<li>LTS support and licenses Java 17 LTS is the latest long-term support release for the Java SE platform<\/li>\n<li>Pattern matching for the switch case<\/li>\n<li>Sealed classes and interfaces. Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\nsealed class Human permits Manish, Vartika, Anjali \r\n{    \r\n    public void printName() \r\n    { \r\n        System.out.println(&quot;Default&quot;); \r\n    } \r\n} \r\n\r\nnon-sealed class Manish extends Human \r\n{ \r\n    public void printName() \r\n    { \r\n        System.out.println(&quot;Manish Sharma&quot;); \r\n    } \r\n} \r\n<\/pre>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Java 7 Features: Usage of Strings in Switch Statement Diamond Operator &#8211; the diamond operator allows you to write more compact (and readable) code by saving repeated type arguments Try with Resources Multiple Exception Handling Suppressed Exceptions Allows Binay Literals &#8211; Binary Literal are expressing Integer Values in terms of Binary Value by adding the&hellip; <a href=\"https:\/\/codethataint.com\/blog\/java-version-comparison\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193],"tags":[253],"class_list":["post-2972","post","type-post","status-publish","format-standard","hentry","category-interview-questions-java","tag-interview"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=2972"}],"version-history":[{"count":6,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2972\/revisions"}],"predecessor-version":[{"id":4809,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2972\/revisions\/4809"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=2972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=2972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=2972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}