Java - New in Java 10 - Interview Questions

Java 10, released six months after Java 9, is the first JDK release that conforms to Oracle's new six-month release cycle.

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

 FAQ

Following are the new features of Java 10.

1. Local variable type inference - Java 10 introduces the keyword 'var' which enables you to declare a local variable without specifying its type. The type for the variables is determined based on the type of object assigned to the local variable.

Example:

var myLocalVar1 = 1 //myLocalVar1 is of type int;
var myLocalVar2 = 'Ace Your Interview' //myLocalVar2 is of type String;
var myLocalVar3 = new HashMap //myLocalVar3 if of type HashMap

This is the only feature interesting from a developer point of view.

2. Unmodifiable collection enhancements - Java 10 introduces new static methods 'copyOf()' on the List, Set and Map interfaces to create unmodifiable collections. if you attempt to modify this collection then you get an UnsupportedOperationException.

3. Application class-data sharing - Class data sharing (CDS) feature has been a part of JDK since Java 8. CDS helps reduce the startup time and memory footprint between multiple Java Virtual Machines (JVM).

Java 10 introduced Application class-data sharing (ApsCDS) that extends the CDS to include selected classes from the application class path.

4. Other changes - Includes improvements to Garbage Collection, New just-in-time compiler, Consolidation of JDK to a single repository, Thread-local handshakes, Time based release versioning, and removal of javah tool from the the JDK.

 
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