Related differences

Java 10 vs Java 11Java 11 vs Java 12

Ques 11. What is Epsilon: A No-Op Garbage Collector in Java 11?

Epsilon is the "No Op" garbage collector. It allocates new memory but never recycles it. Once the application exhausts the available Java heap, the JVM shuts down. It means, Epsilon will allow your application to run out of memory and crash. Elipson is good only for test environments and no-op garbage collector is useful for measuring and managing application performance.

Java 11 also added Z Garbage Collector(ZGC), which promises to manage large heaps with high throughput and short pause times. You need to specify below two runtime switches on the command line, to tell the JVM to use the Epsilon GC

XX:+UnlockExperimentalVMOptions
-XX:+UseEpsilonGC

Below command generate heap dump if JVM runs out of memory.

-XX:HeapDumpOnOutOfMemoryError

Run specified command when an out-of-memory error occurs.

-XX:OnOutOfMemoryError=

Is it helpful? Add Comment View Comments
 

Ques 12. What is Remove the Java EE and CORBA Modules in Java 11?

Java 11 removed the Java EE and CORBA modules from the Java SE Platform and the JDK, these modules were already deprecated in Java 9 with the declared intent to remove them in a future release.

  1. java.xml.ws (JAX-WS, plus the related technologies SAAJ and Web Services Metadata)
  2. java.xml.bind (JAXB)
  3. java.activation (JAF)
  4. java.xml.ws.annotation (Common Annotations)
  5. java.corba (CORBA)
  6. java.transaction (JTA)
  7. java.se.ee
  8. jdk.xml.ws (Tools for JAX-WS)
  9. jdk.xml.bind (Tools for JAXB)

Is it helpful? Add Comment View Comments
 

Ques 13. What is HTTP Client (Standard) in Java 11?

It standardizes Http Client API, in the java.net.http package, based upon the incubated API, and removed the incubated API. The new API supports both HTTP/1.1 and HTTP/2. It is designed to enhance the overall performance of sending requests by a client and receiving responses from the server. It also natively supports WebSockets.

Is it helpful? Add Comment View Comments
 

Ques 14. What is Local-Variable Syntax for Lambda Parameters in Java 11?

It allows var to be used when declaring the formal parameters of implicitly typed lambda expressions.

In Java 10, Local Variable Type Inference was introduced.

var str = "Java 10"; // infers Stringvar list = new ArrayList<String>(); // infers ArrayList<String>var stream = list.stream(); // infers Stream<String>svar bos = new ByteArrayOutputStream();

Java 11, allows var to be used to declare the formal parameters of an implicitly typed lambda expression.

(var a, var b) -> a + b

The examples below are illegal:

// Not allowed to mix 'var' and 'no var' in implicitly typed lambda expression(var a, b) -> a+b// Not allowed to mix 'var' and manifest types in explicitly typed lambda expression(var a, int b) -> a+b   

Is it helpful? Add Comment View Comments
 

Ques 15. What is Key Agreement with Curve25519 and Curve448 in Java 11?

Java makes further improvements in cryptography which provides security and performance. This feature implements a key agreement using Curve25519 and Curve448. Other cryptography libraries, such as OpenSSL and BoringSSL, already support key exchanges using Curve25519 and Curve448.

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: