@Deprecated annotation was introduced in java 5 version. A program element annotated with @Deprecated means it should not be used for any of the following reasons − Its usage may leads to errors. It may be incompatible in future version. It may be removed in future version. A better and
The try-with-resources statement is a try statement with one or more resources duly declared. Here resource is an object which should be closed once it is no more required. The try-with-resources statement ensures that each resource is closed after the requirement finishes. Any object implement
Streams were introduced in Java to help developers perform aggregate operations from a sequence of objects. With Java 9, few more methods are added to make streams better. takeWhile(Predicate Interface) Syntax default Stream<T> takeWhile(Predicate<? super T> predicate) takeWhile m
In Java 9 Process API which is responsible to control and manage operating system processes has been improved considerably. ProcessHandle Class now provides processs native process ID, start time, accumulated CPU time, arguments, command, user, parent process, and descendants. ProcessHandle cla
Prior to java 8, interfaces can have following type of variables/methods. Constant variables Abstract methods So we cannot have method implementation in interfaces or more precisely a default implementation prior to Java 8. See the example. Live Demo public class Tester { public stati
With Java 9, new factory methods are added to List, Set and Map interfaces to create immutable instances. These factory methods are convenience factory methods to create a collection in less verbose and in concise way. Old way to create collections Live Demo import java.util.ArrayList; impo
In java 9, a new feature is introduced where a jar format has been enhanced to have different versions of java class or resources can be maintained and used as per the platform. In JAR, a file MANIFEST.MF file has a entry Multi-Release: true in its main section. META-INF directory also contains
Java documentation can be generated using javadoc tool. It currently generates documentation in html 4.0 format. In java 9, we can generate documentation in html 5 format by using -html5 option in command line arguments. Old style java documentation Consider the following code in C:/JAVA folde
REPL stands for Read-Eval-Print Loop. With JShell, java has REPL capability. Using REPL, we can code and test java based logic without compiling using javac and see the result of calculations directly. Running JShell Open command prompt and type jshell. $ jshell | Welcome to JShell -- Version
Java 9, a new kind of programming component called module has been introduced. A module is a self-describing collection of code and data and has a name to identify it. Features With the Modules component, following enhancements has been added in Java 9 − A new optional phase,link time, i
Local Environment Setup If you want to set up your own environment for Java programming language, then this section guides you through the whole process. Please follow the steps given below to set up your Java environment. Java SE is available for download for free. To download click here, plea
JAVA 9 (aka jdk 1.9) is a major release of JAVA programming language development. Its initial version was released on 21 Sep 2017. The main goals of Java 9 release are − To make JDK and Java Standard Edition platform modular based in the sense that it can be scalled down to small comput
JEP 312 - Thread-Local HandshakesIn JDK 10, a new option is introduced for JVM as -XX:ThreadLocalHandshakes. This options works only for x64 and SPARC based machines.This option is available to improve VM performance. It allows to make a callback on application threads without making a global VM
JEP 319 - Root CertificatesCacerts store, prior to Java 10 is an empty set. It is required to contain a set of certificates which can be used to establish trust in certificates chain of various security protocols of vendors.OpenJDK builds are not having such certificates which is why critical se
JEP 296 - Consolidated JDK Forest as Single RepositoryIn JDK 9, there are eight module based directories termed as repos.rootcorbahotspotjaxpjaxwsjdklangtoolsnashornCode is organized like −$ROOT/jdk/src/java.base...$ROOT/langtools/src/java.compiler...Java 10 onwards, JDK forests are organi
JEP 316 - Heap Allocation on Alternative Memory DevicesWith this enhancement in Java 10, now user can specify an alternative memory device, like NV-DIMM to HotSpot VM to allocation the java heap space. User need to pass a path to the file system using a new option -XX:AllocateHeapAt.-XX:Allocate
JEP 314 - Unicode Language-Tag ExtensionsJava 7 introduced support for BCP 47 Language tags. But this unicode locale extensions was limited to calendar and numbers. With Java 10, java.util.Locale and related classes are updated to implement additional unicode extensions as specified in LDML spec
JEP 304 - Garbage-Collector InterfaceBefore Java 10, GC (Garbage Collector) implementation components were scattered within code base and were not replaceable easily. With Java 10, Garbage-Collector interface is introduced so that alternative GC implementations can be plugged in. It also helps i
JEP 310 − Application Class-Data SharingWhen JVM starts it loads the classes in memory as a preliminary step. In case there are multiple jars having multiple classes, an evident lags appears for the first request. In serverless architecture, such a lag can delay the boot time which is a cr
JEP 317 − Experimental Java-Based JIT CompilerJIT compiler is written in C++ and is used to convert Java into Byte Code. Now Java 10 has option to enable an experimental Java based JIT compiler, Graal to be used instead of standard JIT compiler. Graal is using JVMCI, JVM Compiler Interface
Java
Fidor & Finn AI Launch AI-Powered Chatbot to Transform Banking Experience
Key Insights: Choosing the Right Batch Coding Machine for Your Business
Getting Started with Python: Install, Run, and Write Your First Program
Build a Classic Pong Game on Arduino UNO with OLED Display – Step‑by‑Step Tutorial