Marching ahead with Java 7

48
Marching ahead with Java 7 Towards Excellence… Naresha K., Software Craftsman Twitter: @naresha_k

Transcript of Marching ahead with Java 7

Marching ahead with Java 7Towards Excellence…

Naresha K.,

Software Craftsman

Twitter: @naresha_k

Disclaimer

The features discussed in this presentation are yet to make their public (GA) release and you are advised not to use them in production environments.

The opinions or views expressed in this presentation are solely of the speaker and do not necessarily represent the views of my employer.

Our expectation

http://www.flickr.com/photos/bbalaji/5201413253/

The reality

http://www.flickr.com/photos/majax1/5273616661/

Why are we desperate?

JDK 1.0 1995

JDK 1.1 1997

JDK 1.2 1998

JDK 1.3 2000

JDK 1.4 2002

JDK 1.5 2004

JDK 1.6 2006

JDK 1.7

Why are we desperate?

JDK 1.0 1995

JDK 1.1 1997

JDK 1.2 1998

JDK 1.3 2000

JDK 1.4 2002

JDK 1.5 2004

JDK 1.6 2006

JDK 1.7 7/28

Java 1995 - 2008

Language

Platform

Java 2008 - 2020

Language

Platform

Java Beyond Java

Language Changes

http://www.flickr.com/photos/pastalane/2703741606/

Project Coin

Strings in switch

Strings in switch

Strings in switch

Numeric literals

Numeric literals

Numeric literals

Numeric literals

Multi-catch & precise re throw

Multi-catch

Multi-catch

Precise throw

Precise throw

Precise throw

Precise throw

Precise throw

Generic type inference

Generic type inference

Generic type inference

try with resources

try with resources

try with resources

try with resources

try with resources

Simplified var args

Simplified var args – JDK 1.6

Simplified var args – JDK 1.7

Simplified var args – JDK 1.7

IDE Support

Themes

ThemesCompatibility

Productivity

Performance

Universality

Integration

Java 7 JSRs

JSR 336

• Java 7 changes

JSR 292

• Invoke Dynamic

JSR 334

• Project Coin

JSR 203

• NIO 2

G1 Garbage Collector

Invoke instructions

invokestatic

invokespecial

invokeinterface

Invokevirtual

invokedynamic

invokedynamic

API Improvement

public void compareDemo() {

int a = 10;

int b = 20;

// Java 6

int result = Integer.valueOf(a).compareTo(Integer.valueOf(b));

// Java 7

result = Integer.compare(a, b);

}

Happy Journey

http://www.flickr.com/photos/mspoggis/2205184489/

Happy Journey