Java - New in Java 11 - Interview Questions

Java 11 was released in Septemper 2018 six months after Java 10 conforming to Oracle's new six-month release cycle.

What are the key features and enhancements introduced in Java 11?

 FAQ

Following are some key new features of Java 11.

1. New methods in String class - Following new methods are added in the String class which help in manipulating String objects and reduce boilerplate code.

  • isBlank
  • lines
  • strip
  • stripLeading
  • stripTrailing
  • repeat

2. Local-Variable Syntax for Lambda Parameters The reserved type name 'var' (local variable syntax) can now be used when declaring the formal parameters of a lambda expression. This enables us to apply modifiers such as type annotations to lambda parameters.

New dafault toArray() method in Collection - A new default method toArray(IntFunction) has been added to the java.util.Collection interface. This method allows the collection's elements to be transferred to a newly created array of a desired runtime type.

String[] strArray = list.toArray(String[]::new)

HttpClient - The new HTTP client introduced in Java 9 which supports HTTP2 is now a standard feature in Java 11.

 
Java Interview Guide

$15.00

BUY EBOOK
  SSL Secure Payment
Java Interview Quesiuons - Secure Payment
Java Interview Guide

$15.00

BUY EBOOK
  SSL Secure Payment
Java Interview Quesiuons - Secure Payment
 

Java - Interview Questions

Java - Object Oriented ProgrammingJava - Objects & ClassesJava - Data TypesJava - VariablesJava - StringsJava - ArraysJava - CollectionsJava - ReflectionJava - Lambda ExpressionsJava - StreamsJava - GenericsJava - ExceptionsJava - IOJava - ThreadsJava - ConcurrencyJava - JDBCJava - NetworkingJava - SecurityJava - JVM InternalsJava - PerformanceJava - New in Java 8Java - New in Java 9Java - New in Java 10Java - New in Java 11
 
MASTER Java  

Top ranked courses to help you master Java skills.
Java Programming Masterclass

iconicon

Offered By - Tim Buchalka
Platform - Udemy
Rating - * * * * *
Students Enrolled - 575,000 +

RECOMMENDED RESOURCES
Behaviorial Interview
Top resource to prepare for behaviorial and situational interview questions.

STAR Interview Example