Related differences

Java 10 vs Java 11Java 11 vs Java 12

Ques 16. What is Unicode 10 in Java 11?

It supports the latest Unicode version, particularly in the classes below:

  1. Character and String in the java.lang package
  2. NumericShaper in the java.awt.font package
  3. Bidi, BreakIterator, and Normalizer in the java.text package

Is it helpful? Add Comment View Comments
 

Ques 17. What is Flight Recorder in Java 11?

Java Flight Recorder (JFR) is a profiling tool that collects data about events during the execution of a Java application in Java Virtual Machine (JVM). JFR is integrated into the JVM and part of the JDK distribution.

  • Using Command Line: Compile FlightRecTest Java program by executing the below command, which will generate FlightRecTest.class file at src/com/withoutbook/flightrecorder location.
    javac -d out -sourcepath src/com/withoutbook/flightrecorder/FlightRecTest.java
    Once compilation is successful, the following options can be taken to start the program:
    java -XX:+UnlockCommercialFeatures -XX:+FlightRecorder  -XX:StartFlightRecording=duration=200s,filename=recording.jfr  -cp ./out/ com.withoutbook.flightrecorder.FlightRecTest
  • Using Diagnostic Command: The jcmd tool also allows registration of events to start. To start a 70-second recording on the running Java process with the identifier 4532 and save it to recording.jfr in the current directory, use the following:
    jcmd 4532 JFR.start duration=70s filename=recording.jfr
    Below commands relevant to Java Flight Recorder are:
    //Start a recording.JFR.start//It check the status of all recordings running for the specified process, including the recording file name, identification number, duration.JFR.check//It stop recording with a specific identification number, by default, recording 1 is stopped.JFR.stop//It dump the data collected by the recording with a specific identification number, by default, data from recording 1 is dumped.JFR.dump

Is it helpful? Add Comment View Comments
 

Ques 18. What are ChaCha20 and Poly1305 Cryptographic Algorithms in Java 11?

Java 11 has Implement the ChaCha20 and ChaCha20-Poly1305 ciphers.

ChaCha20 is a new stream cipher which replaces the older, insecure RC4 stream cipher.
Poly1305 is a cryptographic Message Authentication Code (MAC), used on both Encrypted and Decrypted messages, it creates the authentication token and guarantees the integrity of the message.

In ChaCha20-Poly1305 algorithm, ChaCha20 Stream cipher performs the Encryption and Poly1305 performs the Authentication. The ChaCha20 and ChaCha20-Poly1305 algorithms will implement the javax.crypto.CipherSpi API within the SunJCE provider.

Is it helpful? Add Comment View Comments
 

Ques 19. What is Launch Single-File Source-Code Programs in Java 11?

It enhances the Java launcher to run the program provided as a single Java source code file, including the use of "shebang" files and related techniques from within the script.

Is it helpful? Add Comment View Comments
 

Ques 20. What is Low-Overhead Heap Profiling in Java 11?

It provides a way to get information from the JVM about Java object heap allocations that:

  1. Is low-overhead enough to be enabled by default continuously
  2. Is accessible via a well-defined, programmatic interface
  3. Sample all allocations (which is not limited to allocations that are in one particular heap region or that were allocated in one particular way)
  4. It can be defined in an implementation-independent way (i.e., without relying on any particular GC algorithm or VM implementation)
  5. It provide information about both live and dead Java objects.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: