Java / Java 11
1. What is the Java Flight Recorder tool introduced in Java 11?
Java Flight Recorder (JFR) is a Java profiling tool that monitors and diagnoses any running Java application. It is responsible for collecting data about the running environment, JVM, and Java application and dumps the recorded data into a .jfr file,...
2. What is Java Mission Control in Java 11?
Java Mission Control is an application that can analyze the dumps that come from Java Flight Recorder, and give you a graphical overview of what is happening inside of a JVM.
3. List some of the Java 11 Features.
Java 11 is the first long-term support (LTS) release after Java 8. Oracle also stopped supporting Java 8 in January 2019....
4. What is the Z Garbage Collector (ZGC) in Java 11?
ZGC is a low-pause collector that keeps pause times in the millisecond range as heaps grow. Enable it with -XX:+UseZGC on supported JDKs.
5. Difference between Oracle JDK and OpenJDK.
The main difference between Oracle JDK and OpenJDK is that Oracle JDK incorporates some commercial features. Rather than removing these features to get conversions between Oracle JDK and OpenJDK, Oracle has committed to open source these commercial features into OpenJDK....
6. Mention few deprecated modules in Java 11.
Nashorn JavaScript Engine, Pack200 compression scheme for JAR files.
7. What is Nest-Based Access Control feature in Java 11?
Nest-Based Access Control, supports private member access within nest members directly, without the need of any auto-generated bridge method. The change is backward compatible, which requires no code change, it is just a Java compiler's optimization to remove the bridge...
8. What is String.lines() API in Java 11?
The lines() method is a static method that returns a stream of lines extracted from a given multi-line string, separated by line terminators. public Stream<String> lines() The stream returned by lines() method contains the lines from this string in the...
9. Explain String strip API in Java 11.
String class includes 3 more methods which help in removing extra white-spaces in Java 11. String strip() returns a string whose value is given string, with all leading and trailing white space removed....
10. What are compact Strings in Java?
Since Java 9, the JVM optimizes strings by using a new feature called Compact Strings. Instead of having a char[] array, a string can be represented as a byte[] array....