dcsimg
LinkedIn
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
Apr 11, 2019

Using Java Variable Type Inference in Java 10

Beginning with JDK 10, we can rely on the Java Local Variable Type Inference (Var Type) in order to avoid explicit typing.

Check out the following sample:

var outputStream = new ByteArrayOutputStream();

This is a shortcut for:

ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Octavia Anghel
 
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date