SlideShare a Scribd company logo
Java SE 7 New Features &
Enhancements
Fu Cheng @alexcheng1982
Author of Understanding the Java 7 Author of technical articles on
Agenda
• Usefull tips
– Language
– IO
• No deep dive topics
Why Java Platform
Why Java
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
Why Java
• Easy to learn
– Simple
• Easy to use
– Strong community
– All kinds of third-party libraries
• HARD to do things WRONG
– Static typed
– Rigid syntax
Why Java 7
• 5 years from Java SE 6 to Java SE 7
• New features
– JVM level
– Language level
– API
• Enhancements
– Performance
– Management
– Documentation
String in Switch
• “switch” statement
• Prior to Java 7
– Can only use data type compatible with integer in
“switch”
• Java 7
– String type is allowed
• Under the hood
– Switch by string hash code
Sample
Numeric Literals
• Java only supports literals of primitive types
– List & map literals – Java SE 8 (maybe)
• Binary literals
– Prefixed with 0b or 0B
• 0b001001
• Underscores in literals
– Align for readability
• 5_6.3_4
Exception Handling
• Multiple exception types in one catch clause
try-with-resources
• Use try clause to manage resources
– “finally” not required
– Resource released automatically
• Make you own resource manageable by try
clause
– Implement java.lang.AutoCloseable
– “close”method invoked automatically
Sample
File copy example
Diamond Operator
• Use diamond (<>) operator to simply generic
objects creation
Old way
New way
Path
• java.nio.file.Path
– New abstraction for file path
– Say goodbye to using string for file path
– Type safe
Directory Stream
• java.nio.file.DirectoryStream
• List files in directory
• Provide better performance than “File.list” and “File.listFiles”
• Extend from Iterable
Directory Watcher
• Get notified when files changed in a directory
– Entry created, modified or deleted
Those Not Included
• JSR 292 – “invokedynamic” instruction
• Concurrency utilities
– Fork/join framework
– Phaser
• I18N
– Unicode 6.0
– IETF BCP 47
• NIO.2
– Zip/jar file system
– Async I/O
• JDBC 4.1
Future of Java
• Productivity
– Enhanced for loop (Java SE 5)
– try-with-resources (Java SE 7)
– Diamond operator (Java SE 7)
– Lambda expression (Java SE 8)
• Performance
– Fork/join framework (Java SE 7)
– Collection framework enhancements (Java SE 8)
• Modularization
– Project Jigsaw (Java SE 8)

More Related Content

What's hot (20)

KEY
An introduction to Rails 3
Blazing Cloud
 
PPTX
Agile sites @ telmore
Michele Sciabarrà
 
PPTX
Agile sites2
Michele Sciabarrà
 
PPTX
No Container: a Modern Java Stack with Bootique
Andrus Adamchik
 
PDF
Infinum Android Talks #02 - ActiveAndroid
Infinum
 
PDF
Infinum Android Talks #02 - How to write an annotation processor in Android
Infinum
 
PDF
JCR - Java Content Repositories
Carsten Ziegeler
 
PPTX
Scala in the Wild
Tomer Gabel
 
PPTX
Apachesolr presentation
freeformkurt
 
PPTX
Search and analyze your data with elasticsearch
Anton Udovychenko
 
PPTX
Scala adoption by enterprises
Mike Slinn
 
PDF
Apereo OAE - Bootcamp
Nicolaas Matthijs
 
PDF
Transactions and Concurrency Control Patterns
Vlad Mihalcea
 
PPT
Sbt, idea and eclipse
Mike Slinn
 
PPTX
Day 7 - Make it Fast
Barry Jones
 
PPTX
WEPA - Webdriver Enhanced Platform for Automation - WEPATest
Freddy Vega
 
PDF
Hibernate ORM: Tips, Tricks, and Performance Techniques
Brett Meyer
 
PPTX
Scala in the Enterprise
Eric Pederson
 
PPTX
Spider进化论
cjhacker
 
PPTX
Drupal7 and Apache Solr
Nikolay Ignatov
 
An introduction to Rails 3
Blazing Cloud
 
Agile sites @ telmore
Michele Sciabarrà
 
Agile sites2
Michele Sciabarrà
 
No Container: a Modern Java Stack with Bootique
Andrus Adamchik
 
Infinum Android Talks #02 - ActiveAndroid
Infinum
 
Infinum Android Talks #02 - How to write an annotation processor in Android
Infinum
 
JCR - Java Content Repositories
Carsten Ziegeler
 
Scala in the Wild
Tomer Gabel
 
Apachesolr presentation
freeformkurt
 
Search and analyze your data with elasticsearch
Anton Udovychenko
 
Scala adoption by enterprises
Mike Slinn
 
Apereo OAE - Bootcamp
Nicolaas Matthijs
 
Transactions and Concurrency Control Patterns
Vlad Mihalcea
 
Sbt, idea and eclipse
Mike Slinn
 
Day 7 - Make it Fast
Barry Jones
 
WEPA - Webdriver Enhanced Platform for Automation - WEPATest
Freddy Vega
 
Hibernate ORM: Tips, Tricks, and Performance Techniques
Brett Meyer
 
Scala in the Enterprise
Eric Pederson
 
Spider进化论
cjhacker
 
Drupal7 and Apache Solr
Nikolay Ignatov
 

Viewers also liked (20)

PDF
Java se-7-evolves-toulouse-jug-2001-09-14
Baptiste Mathus
 
PDF
What's New in spring-security-core 2.0
Burt Beckwith
 
PDF
What's Coming in Spring 3.0
Matt Raible
 
ODP
Securing Portlets With Spring Security
John Lewis
 
PPTX
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
DevelopIntelligence
 
PPTX
The State of OAuth2
Aaron Parecki
 
PPTX
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Aaron Parecki
 
PPTX
Spring security
Saurabh Sharma
 
PDF
Java 7 New Features
Jussi Pohjolainen
 
PPTX
An Introduction to OAuth2
Aaron Parecki
 
PPTX
Spring Security
Boy Tech
 
PPTX
Spring Security 3
Jason Ferguson
 
PDF
Microservices /w Spring Security OAuth
Makoto Kakuta
 
PDF
ConFoo 2015 - Securing RESTful resources with OAuth2
Rodrigo Cândido da Silva
 
PDF
JavaOne 2014 - Securing RESTful Resources with OAuth2
Rodrigo Cândido da Silva
 
PDF
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Matt Raible
 
PPTX
Spring security
Slimen Belhaj Ali
 
PDF
Spring Day | Identity Management with Spring Security | Dave Syer
JAX London
 
PDF
OAuth for your API - The Big Picture
Apigee | Google Cloud
 
PPT
Spring security integrate with mule
Son Nguyen
 
Java se-7-evolves-toulouse-jug-2001-09-14
Baptiste Mathus
 
What's New in spring-security-core 2.0
Burt Beckwith
 
What's Coming in Spring 3.0
Matt Raible
 
Securing Portlets With Spring Security
John Lewis
 
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)
DevelopIntelligence
 
The State of OAuth2
Aaron Parecki
 
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
Aaron Parecki
 
Spring security
Saurabh Sharma
 
Java 7 New Features
Jussi Pohjolainen
 
An Introduction to OAuth2
Aaron Parecki
 
Spring Security
Boy Tech
 
Spring Security 3
Jason Ferguson
 
Microservices /w Spring Security OAuth
Makoto Kakuta
 
ConFoo 2015 - Securing RESTful resources with OAuth2
Rodrigo Cândido da Silva
 
JavaOne 2014 - Securing RESTful Resources with OAuth2
Rodrigo Cândido da Silva
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Matt Raible
 
Spring security
Slimen Belhaj Ali
 
Spring Day | Identity Management with Spring Security | Dave Syer
JAX London
 
OAuth for your API - The Big Picture
Apigee | Google Cloud
 
Spring security integrate with mule
Son Nguyen
 
Ad

Similar to Java SE 7 New Features and Enhancements (20)

PPTX
Java se7 features
Kumaraswamy M
 
PDF
What`s new in Java 7
Georgian Micsa
 
PPT
Java7
Dinesh Guntha
 
PDF
Java 7 workshop
Dennis Laumen
 
DOCX
Java 7 Dolphin manjula kollipara
Manjula Kollipara
 
PPTX
Java 7 Whats New(), Whats Next() from Oredev
Mattias Karlsson
 
PDF
Terence Barr - jdk7+8 - 24mai2011
Agora Group
 
KEY
Introduction to Java 7 (OSCON 2012)
Martijn Verburg
 
PPTX
Java 7 & 8 New Features
Leandro Coutinho
 
KEY
Back to the future with Java 7 (Geekout June/2011)
Martijn Verburg
 
PDF
engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!
René Winkelmeyer
 
PPTX
Java industrial 6 month training with kvch
kvchinstitute
 
PPSX
Java Semimar Slide (Cetpa)
Pratima Parida
 
PPSX
Java Semimar Slide (Cetpa)
Pratima Parida
 
PPTX
20 Years of Java - Story of HER life
Stojan Peshov
 
PPTX
Java9to19Final.pptx
iFour Technolab Pvt. Ltd.
 
PPTX
History of java'
deepthisujithra
 
PPT
Java user group 2015 02-09-java8
Marc Tritschler
 
PPT
Java user group 2015 02-09-java8
marctritschler
 
PPT
What is Java Technology (An introduction with comparision of .net coding)
Shaharyar khan
 
Java se7 features
Kumaraswamy M
 
What`s new in Java 7
Georgian Micsa
 
Java 7 workshop
Dennis Laumen
 
Java 7 Dolphin manjula kollipara
Manjula Kollipara
 
Java 7 Whats New(), Whats Next() from Oredev
Mattias Karlsson
 
Terence Barr - jdk7+8 - 24mai2011
Agora Group
 
Introduction to Java 7 (OSCON 2012)
Martijn Verburg
 
Java 7 & 8 New Features
Leandro Coutinho
 
Back to the future with Java 7 (Geekout June/2011)
Martijn Verburg
 
engage 2016 - Get ready for moving from Java 6 to Java 8 - Now!
René Winkelmeyer
 
Java industrial 6 month training with kvch
kvchinstitute
 
Java Semimar Slide (Cetpa)
Pratima Parida
 
Java Semimar Slide (Cetpa)
Pratima Parida
 
20 Years of Java - Story of HER life
Stojan Peshov
 
Java9to19Final.pptx
iFour Technolab Pvt. Ltd.
 
History of java'
deepthisujithra
 
Java user group 2015 02-09-java8
Marc Tritschler
 
Java user group 2015 02-09-java8
marctritschler
 
What is Java Technology (An introduction with comparision of .net coding)
Shaharyar khan
 
Ad

More from Fu Cheng (6)

PDF
Introduction to Web Components
Fu Cheng
 
PPT
The Evolution of Java
Fu Cheng
 
PDF
Advanced guide to develop ajax applications using dojo
Fu Cheng
 
PDF
Java类加载器
Fu Cheng
 
PPT
Ajax应用开发最佳实践
Fu Cheng
 
PPT
Advanced JavaScript
Fu Cheng
 
Introduction to Web Components
Fu Cheng
 
The Evolution of Java
Fu Cheng
 
Advanced guide to develop ajax applications using dojo
Fu Cheng
 
Java类加载器
Fu Cheng
 
Ajax应用开发最佳实践
Fu Cheng
 
Advanced JavaScript
Fu Cheng
 

Recently uploaded (20)

PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
July Patch Tuesday
Ivanti
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
July Patch Tuesday
Ivanti
 

Java SE 7 New Features and Enhancements