SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Java 7
Anything new under the Sun?
Java 7
Hands-on
 Java 8+
Versions
JDK 1.0     Jan, 1996
JDK 1.1     Feb, 1997
J2SE 1.2    Dec, 1998
J2SE 1.3    May, 2000
J2SE 1.4    Feb, 2002
J2SE 5.0    Sep, 2004
Java SE 6   Dec, 2006
Java SE 7   Jul, 2011
Plans
    Plan A


      JDK 7
As currently planned




   Mid 2012
Plans
    Plan A                             Plan B

                               JDK7                 JDK8
      JDK 7                 minus Lambda,
                                                Lambda, Jigsaw,
As currently planned      Jigsaw, and part of
                                                and rest of Coin
                                 Coin



   Mid 2012                  Mid 2011            End 2012
Platform Features
    API Features
Language Features
Dynamic Language
    Support
JVM has no support for dynamic
languages:
• Existing JVM instruction set is
  statically typed
• Limited support for dynamically
  modifying existing classes and
  methods
Dynamic Language
    Support
Java 7 adds:
• a new invokedynamic instruction at the
   JVM level
• ability to change classes and
   methods at runtime dynamically in a
   production environment.
Other Platform
       Features

•   JVM performance enhancements
•   Upgrade class-loader architecture
•   Garbage-First Collector
•   New JavaDoc layout
Platform Features
    API Features
Language Features
Fork/Join
NIO.2

• The FileVisitor API
• Directory watching
• File attributes
• Custom filesystem providers (ZIP)
Other API Features
• Updated XML stacks
• JDBC 4.1
• MethodHandles
• Unicode 6.0 and Locale enhancements
• Elliptic-curve cryptography
• Enhanced MBeans
Platform Features
    API Features
Language Features
Strings in switch
String line = in.readLine();

switch (line) {
  case "hello":
   System.out.println("hello world!");
    return;
  case "cafe":
   System.out.println("cafebabe!");
    return;
  default:
   System.out.println("wrong...");
}
Literals

int binary = 0b1001_0000_1111_0010;
System.out.println(binary);
System.out.println(Integer.toBinaryString(binary));

int readableMillion = 1_000_000;
System.out.println(readableMillion);

int readableBillion = 1_000_000_000;
System.out.println(readableBillion);
Multi-catch
/* Java 6 and older */
} catch (IOException e) {
     logger.log(e);
     throw e;
} catch (SQLException e) {
     logger.log(e);
     throw e;
}

/* Java 7 */
} catch (IOException | SQLException e) {
     logger.log(e);
     throw e;
}
Precise rethrow
public void preciseRethrow() throws IOException {
    try {
        new SimpleDateFormat("yyyyMMdd").parse("foo");
        new FileReader("file.txt").read();
    } catch(ParseException e) {
        System.out.println(e.getMessage());
    } catch(Exception e) {
        System.out.println(e.getMessage());
        throw e;
    }
}
“Diamond”
/* Java 5 & 6 */
Map<String, List<String>> myMap = new HashMap<String,
List<String>>();

/* Java 7 */
Map<String, List<String>> myMap = new HashMap<>();

/* Be warned, the compiler still generates an unchecked
conversion warning! */
Map<String, List<String>> myMap = new HashMap();
Try-with-resources

File file = new File("input.txt");

try (InputStream is = new FileInputStream(file)) {
    // do something with this input stream
} catch (FileNotFoundException ex) {
    System.err.println(file.getAbsolutePath());
}
Java 7
Hands-on
 Java 8+
IMDb

We’re building an application which
reads IMDb data and parses it to
determine which actor has made the
best films.
Read files

• Open project SequentialWithoutIO
• Update root field in class IMDB
• Find method readFilms() and
  readActors() in class IMDB

• Implement!
NIO.2 Hints
  /** Read a UTF-16 file like ratings-clean.txt **/
try (BufferedReader reader = Files.newBufferedReader(
    file, Charset.forName(“UTF-16”)))

/** Read all actor files in a directory **/
try (DirectoryStream<Path> stream =
 Files.newDirectoryStream(dir, “actor*.txt”))

/** Read all lines in file **/
Files.readAllLines(entry, Charset.forName(“UTF-8”));
Parse files
• Open project SequentialParserWithIO
  (or continue with your previous project)
• Update root field in class IMDB
• Find method compute() in classes
  ActorParseTask and FilmParseTask

• Implement!
Fork/Join Hints
/** Start computing with checking if the work is small
enough to do sequentially **/

/** Fork! **/
Collection<ParseTask> completedForks = invokeAll(
    /** give a list work packages **/);

/** Join! **/
for (ParseTask task : completedForks)
/** Join all the results of the tasks and return this
collection **/
Java 7
Hands-on
 Java 8+
Features
• Project Coin 2
 • List literals: [1,   2, 3]

 • Map literals: [“a”:    1, “b”: 2, “c”: 3]

• Project Lambda: (x,      y) => x + y

• Type annotations: List<@NonNull        Object>

• Superpackages
Features
• Project Jigsaw
 • JDK modularity
 • Modular and versioned applications
• Joda Time
• Project HotRockit
• Porting JDeveloper to Netbeans
Java 8 workshop
    December 2012
      Hopefully...

Más contenido relacionado

La actualidad más candente

Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Arun Gupta
 
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Arun Gupta
 
JavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGJavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGMarakana Inc.
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusArun Gupta
 
Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Arun Gupta
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Agora Group
 
What's new in Java EE 6
What's new in Java EE 6What's new in Java EE 6
What's new in Java EE 6Gal Marder
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Arun Gupta
 
Understanding
Understanding Understanding
Understanding Arun Gupta
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaArun Gupta
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsHirofumi Iwasaki
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Skills Matter
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudArun Gupta
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureArun Gupta
 

La actualidad más candente (19)

Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
Tools Coverage for the Java EE Platform @ Silicon Valley Code Camp 2010
 
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
Java EE 6 Hands-on Workshop at Dallas Tech Fest 2010
 
JavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUGJavaEE 6 and GlassFish v3 at SFJUG
JavaEE 6 and GlassFish v3 at SFJUG
 
Java EE6 Overview
Java EE6 OverviewJava EE6 Overview
Java EE6 Overview
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Java EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexusJava EE 6 & GlassFish v3 @ DevNexus
Java EE 6 & GlassFish v3 @ DevNexus
 
Glass Fishv3 March2010
Glass Fishv3 March2010Glass Fishv3 March2010
Glass Fishv3 March2010
 
Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6Understanding the nuts & bolts of Java EE 6
Understanding the nuts & bolts of Java EE 6
 
Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011Andrei Niculae - JavaEE6 - 24mai2011
Andrei Niculae - JavaEE6 - 24mai2011
 
What's new in Java EE 6
What's new in Java EE 6What's new in Java EE 6
What's new in Java EE 6
 
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
Java EE 6 & GlassFish v3 at Vancouver JUG, Jan 26, 2010
 
Understanding
Understanding Understanding
Understanding
 
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 IndiaJava EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
Java EE 6 & GlassFish v3: Paving the path for the future - Tech Days 2010 India
 
Java EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise SystemsJava EE 7 for Real Enterprise Systems
Java EE 7 for Real Enterprise Systems
 
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3 Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
Arun Gupta: London Java Community: Java EE 6 and GlassFish 3
 
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the CloudTDC 2011: The Java EE 7 Platform: Developing for the Cloud
TDC 2011: The Java EE 7 Platform: Developing for the Cloud
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Java EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for futureJava EE 6 and GlassFish v3: Paving the path for future
Java EE 6 and GlassFish v3: Paving the path for future
 
Whats New In Java Ee 6
Whats New In Java Ee 6Whats New In Java Ee 6
Whats New In Java Ee 6
 

Similar a Java 7 workshop

Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaManjula Kollipara
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Hirofumi Iwasaki
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemRafael Winterhalter
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevMattias Karlsson
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youDmitry Buzdin
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7Deniz Oguz
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RaceBaruch Sadogursky
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overviewJong Soon Bok
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?gedoplan
 
All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1Markus Eisele
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introductionejlp12
 
Java History - MyExamCloud Presentation
Java History - MyExamCloud PresentationJava History - MyExamCloud Presentation
Java History - MyExamCloud PresentationGanesh P
 
J2EE Struts with Hibernate Framework
J2EE Struts with Hibernate FrameworkJ2EE Struts with Hibernate Framework
J2EE Struts with Hibernate Frameworkmparth
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewEugene Bogaart
 

Similar a Java 7 workshop (20)

Introducing Java 7
Introducing Java 7Introducing Java 7
Introducing Java 7
 
Evolution Of Java
Evolution Of JavaEvolution Of Java
Evolution Of Java
 
Evolution of java
Evolution of javaEvolution of java
Evolution of java
 
Java 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kolliparaJava 7 Dolphin manjula kollipara
Java 7 Dolphin manjula kollipara
 
Future of Java EE with Java SE 8
Future of Java EE with Java SE 8Future of Java EE with Java SE 8
Future of Java EE with Java SE 8
 
Java and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystemJava and OpenJDK: disecting the ecosystem
Java and OpenJDK: disecting the ecosystem
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Java 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for youJava 7 and 8, what does it mean for you
Java 7 and 8, what does it mean for you
 
New Features Of JDK 7
New Features Of JDK 7New Features Of JDK 7
New Features Of JDK 7
 
Pure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools RacePure Java RAD and Scaffolding Tools Race
Pure Java RAD and Scaffolding Tools Race
 
JavaOne 2011 Recap
JavaOne 2011 RecapJavaOne 2011 Recap
JavaOne 2011 Recap
 
Chapter 1. java programming language overview
Chapter 1. java programming language overviewChapter 1. java programming language overview
Chapter 1. java programming language overview
 
JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?JUG Berlin Brandenburg: What's new in Java EE 7?
JUG Berlin Brandenburg: What's new in Java EE 7?
 
All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1All the Java ADF beginners need to know - part1
All the Java ADF beginners need to know - part1
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
JavaEE 6 tools coverage
JavaEE 6 tools coverageJavaEE 6 tools coverage
JavaEE 6 tools coverage
 
Java History - MyExamCloud Presentation
Java History - MyExamCloud PresentationJava History - MyExamCloud Presentation
Java History - MyExamCloud Presentation
 
J2EE Struts with Hibernate Framework
J2EE Struts with Hibernate FrameworkJ2EE Struts with Hibernate Framework
J2EE Struts with Hibernate Framework
 
J2 Ee Overview
J2 Ee OverviewJ2 Ee Overview
J2 Ee Overview
 
Java Enterprise Edition 6 Overview
Java Enterprise Edition 6 OverviewJava Enterprise Edition 6 Overview
Java Enterprise Edition 6 Overview
 

Último

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Java 7 workshop

  • 1. Java 7 Anything new under the Sun?
  • 3. Versions JDK 1.0 Jan, 1996 JDK 1.1 Feb, 1997 J2SE 1.2 Dec, 1998 J2SE 1.3 May, 2000 J2SE 1.4 Feb, 2002 J2SE 5.0 Sep, 2004 Java SE 6 Dec, 2006 Java SE 7 Jul, 2011
  • 4. Plans Plan A JDK 7 As currently planned Mid 2012
  • 5. Plans Plan A Plan B JDK7 JDK8 JDK 7 minus Lambda, Lambda, Jigsaw, As currently planned Jigsaw, and part of and rest of Coin Coin Mid 2012 Mid 2011 End 2012
  • 6. Platform Features API Features Language Features
  • 7. Dynamic Language Support JVM has no support for dynamic languages: • Existing JVM instruction set is statically typed • Limited support for dynamically modifying existing classes and methods
  • 8. Dynamic Language Support Java 7 adds: • a new invokedynamic instruction at the JVM level • ability to change classes and methods at runtime dynamically in a production environment.
  • 9. Other Platform Features • JVM performance enhancements • Upgrade class-loader architecture • Garbage-First Collector • New JavaDoc layout
  • 10. Platform Features API Features Language Features
  • 12. NIO.2 • The FileVisitor API • Directory watching • File attributes • Custom filesystem providers (ZIP)
  • 13. Other API Features • Updated XML stacks • JDBC 4.1 • MethodHandles • Unicode 6.0 and Locale enhancements • Elliptic-curve cryptography • Enhanced MBeans
  • 14. Platform Features API Features Language Features
  • 15. Strings in switch String line = in.readLine(); switch (line) { case "hello":    System.out.println("hello world!");     return;   case "cafe":    System.out.println("cafebabe!");     return;   default:    System.out.println("wrong..."); }
  • 16. Literals int binary = 0b1001_0000_1111_0010; System.out.println(binary); System.out.println(Integer.toBinaryString(binary)); int readableMillion = 1_000_000; System.out.println(readableMillion); int readableBillion = 1_000_000_000; System.out.println(readableBillion);
  • 17. Multi-catch /* Java 6 and older */ } catch (IOException e) { logger.log(e); throw e; } catch (SQLException e) { logger.log(e); throw e; } /* Java 7 */ } catch (IOException | SQLException e) { logger.log(e); throw e; }
  • 18. Precise rethrow public void preciseRethrow() throws IOException {     try {         new SimpleDateFormat("yyyyMMdd").parse("foo");         new FileReader("file.txt").read();     } catch(ParseException e) {         System.out.println(e.getMessage());     } catch(Exception e) {         System.out.println(e.getMessage());         throw e;     } }
  • 19. “Diamond” /* Java 5 & 6 */ Map<String, List<String>> myMap = new HashMap<String, List<String>>(); /* Java 7 */ Map<String, List<String>> myMap = new HashMap<>(); /* Be warned, the compiler still generates an unchecked conversion warning! */ Map<String, List<String>> myMap = new HashMap();
  • 20. Try-with-resources File file = new File("input.txt"); try (InputStream is = new FileInputStream(file)) { // do something with this input stream } catch (FileNotFoundException ex) { System.err.println(file.getAbsolutePath()); }
  • 22. IMDb We’re building an application which reads IMDb data and parses it to determine which actor has made the best films.
  • 23. Read files • Open project SequentialWithoutIO • Update root field in class IMDB • Find method readFilms() and readActors() in class IMDB • Implement!
  • 24. NIO.2 Hints /** Read a UTF-16 file like ratings-clean.txt **/ try (BufferedReader reader = Files.newBufferedReader( file, Charset.forName(“UTF-16”))) /** Read all actor files in a directory **/ try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir, “actor*.txt”)) /** Read all lines in file **/ Files.readAllLines(entry, Charset.forName(“UTF-8”));
  • 25. Parse files • Open project SequentialParserWithIO (or continue with your previous project) • Update root field in class IMDB • Find method compute() in classes ActorParseTask and FilmParseTask • Implement!
  • 26. Fork/Join Hints /** Start computing with checking if the work is small enough to do sequentially **/ /** Fork! **/ Collection<ParseTask> completedForks = invokeAll( /** give a list work packages **/); /** Join! **/ for (ParseTask task : completedForks) /** Join all the results of the tasks and return this collection **/
  • 28. Features • Project Coin 2 • List literals: [1, 2, 3] • Map literals: [“a”: 1, “b”: 2, “c”: 3] • Project Lambda: (x, y) => x + y • Type annotations: List<@NonNull Object> • Superpackages
  • 29. Features • Project Jigsaw • JDK modularity • Modular and versioned applications • Joda Time • Project HotRockit • Porting JDeveloper to Netbeans
  • 30. Java 8 workshop December 2012 Hopefully...