Java 7 includes minor language changes through Project Coin and support for dynamic languages via the invokedynamic bytecode instruction. It also adds the Fork/Join framework for parallel programming and NIO.2 with the new filesystem API and asynchronous channels. Key features like lambda functions and modularity were deferred to Java 8.
This is a presentation given in a Java Open day conducted by Trainologic.
Trainologic shares its training content for free at trainologic.org you can find many more free full course there.
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)DevelopIntelligence
Kelby Zorgdrager from DevelopIntelligence explains the differences between the variations of Java and what's new in Java 7.
If you need help with Java training DevelopIntelligence and provide on-site training within two weeks. Customized and affordable for any organization.
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
JIT Versus AOT: Unity And Conflict of Dynamic and Static Compilers (JavaOne 2...Nikita Lipsky
Java has been constantly criticized for poor performance ever since its inception, but not as much in recent years. Thanks to optimizing dynamic native code compilers, Java performance today is very close to the performance of low-level languages such as C/C++. Along with dynamic compilers, static compilers for Java have been evolving as well, so there is still no clear winner between these two approaches. It is not a surprise that an AOT compiler is finally going to appear in Java 9 via JEP-295. This session’s speaker would like to dispel common myths about the old dispute over whether dynamic or static compilation is better, show that both approaches have their strengths and weaknesses, and explain why the future is the hybrid approach.
This is a presentation given in a Java Open day conducted by Trainologic.
Trainologic shares its training content for free at trainologic.org you can find many more free full course there.
Whats New in Java 5, 6, & 7 (Webinar Presentation - June 2013)DevelopIntelligence
Kelby Zorgdrager from DevelopIntelligence explains the differences between the variations of Java and what's new in Java 7.
If you need help with Java training DevelopIntelligence and provide on-site training within two weeks. Customized and affordable for any organization.
What is Java Technology (An introduction with comparision of .net coding)Shaharyar khan
A introductory slides for those who want to learn and know some basics of Java.Also for those persons who want to compare coding difference between Java and .net
JIT Versus AOT: Unity And Conflict of Dynamic and Static Compilers (JavaOne 2...Nikita Lipsky
Java has been constantly criticized for poor performance ever since its inception, but not as much in recent years. Thanks to optimizing dynamic native code compilers, Java performance today is very close to the performance of low-level languages such as C/C++. Along with dynamic compilers, static compilers for Java have been evolving as well, so there is still no clear winner between these two approaches. It is not a surprise that an AOT compiler is finally going to appear in Java 9 via JEP-295. This session’s speaker would like to dispel common myths about the old dispute over whether dynamic or static compilation is better, show that both approaches have their strengths and weaknesses, and explain why the future is the hybrid approach.
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)SmartnSkilled
Préparez-vous à l'examen 1Z0-808 et obtenez la certification OCA Java SE 8 Programmer.
Cette formation vidéo va vous permettre de :
- Réussir la certification Java SE 8 Oracle Certified Associate (OCA), en passant l'examen 1Z0-808.
- Comprendre et appliquer les concepts objets au langage Java (classes, méthodes, encapsulation, héritage, constructeur, polymorphisme, classe abstraite, etc.)
- Connaître et savoir utiliser les types de données du langage Java,
- Maîtriser la syntaxe Java (boucle, test, types, opérateurs, etc.),
- Gérer les exceptions en Java,
- Créer des packages Java et les déployer.
Suivez la formation vidéo par ici : https://www.smartnskilled.com/tutoriel/formation-en-ligne-oca-java-se-8-programmer-1z0-808
어느덧 스무살이 된 자바. 좋든싫든 프로그래밍의 세계에 몸담고 있는 이상 부딪히지 않을 수 없는 언어인데요, 이 자바에 대한 올바른 모습의 이해화 앞으로 나아가야 할 방향을 모색해본다는 의미에서 "모던 자바의 역습"이라는 타이틀로 실시한 온라인 세미나의 슬라이드 자료입니다.
진행자: 김대우(http://lekdw.blogspot.kr/)
정도현(http://moreagile.net)
이번 세미나는 게임개발자이신 김대우님을 모시고 진행하게 되었는데요 자바 언어와 관련 하여 다음과 같은 주제로 두시간에 걸쳐 발표를 진행합니다.
- 간단히 살펴보는 자바20년의 발자취
- 자바를 둘러싼 진실 혹은 거짓(성능,생산성,품질)
- SI영역 이외에서 자바의 가치
- 모던자바의 역습: 자바8과 함수형 프로그래밍
- 자바 개발의 새로운 패러다임들
Automatic Migration of Legacy Java Method Implementations to InterfacesRaffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. In this talk, I will first overview several new, key features of Java 8 that can help make programs easier to read, write, and maintain, especially in regards to collections. These features include Lambda Expressions, the Stream API, and enhanced interfaces, many of which help bridge the gap between functional and imperative programming paradigms and allow for succinct concurrency implementations. Next, I will discuss several open issues related to automatically migrating (refactoring) legacy Java software to use such features correctly, efficiently, and as completely as possible. Solving these problems will help developers to maximally understand and adopt these new features thus improving their software.
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
Ahead-Of-Time Compilation of Java ApplicationsNikita Lipsky
Geekout 2016 presentation.
Ahead-of-time (AOT) native compilation has been available for .NET for quite some time, whereas Java SE, while being older than .NET, still does not have a standard AOT compiler. Some people ask why, some people think that it could only work for certain limited types of Java applications, some people think that it is not needed.
The truth, however, is that a Java AOT compiler has been available for over a decade, as part of a compliant Java SE implementation called Excelsior JET, and it proved to be useful for many organizations around the world. In this session, I would like to dispel the common myths about Java AOT compilation and show where it has advantages over JIT compilation from the technical point of view.
Java Course 7: Text processing, Charsets & EncodingsAnton Keks
Lecture 7 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Do you know the difference between charset & encoding? Every programmer nowadays MUST understand these terms, how they work, and how to use them. Otherwise we constantly face broken software refusing to work with international characters properly.
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
Lecture 3 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Discusses more Java basics and Object Oriented Programming.
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Evento organizado pelo IEA polo Ribeirão Preto - USP.
Tema: Queimadas na Amazônia e seus efeitos no ecossistema e na saúde da população
Palestra do Prof. Dr. Paulo Artaxo Netto
Realizada em 26/08/2011
Support formation vidéo : OCA Java SE 8 Programmer (1Z0-808) (2)SmartnSkilled
Préparez-vous à l'examen 1Z0-808 et obtenez la certification OCA Java SE 8 Programmer.
Cette formation vidéo va vous permettre de :
- Réussir la certification Java SE 8 Oracle Certified Associate (OCA), en passant l'examen 1Z0-808.
- Comprendre et appliquer les concepts objets au langage Java (classes, méthodes, encapsulation, héritage, constructeur, polymorphisme, classe abstraite, etc.)
- Connaître et savoir utiliser les types de données du langage Java,
- Maîtriser la syntaxe Java (boucle, test, types, opérateurs, etc.),
- Gérer les exceptions en Java,
- Créer des packages Java et les déployer.
Suivez la formation vidéo par ici : https://www.smartnskilled.com/tutoriel/formation-en-ligne-oca-java-se-8-programmer-1z0-808
어느덧 스무살이 된 자바. 좋든싫든 프로그래밍의 세계에 몸담고 있는 이상 부딪히지 않을 수 없는 언어인데요, 이 자바에 대한 올바른 모습의 이해화 앞으로 나아가야 할 방향을 모색해본다는 의미에서 "모던 자바의 역습"이라는 타이틀로 실시한 온라인 세미나의 슬라이드 자료입니다.
진행자: 김대우(http://lekdw.blogspot.kr/)
정도현(http://moreagile.net)
이번 세미나는 게임개발자이신 김대우님을 모시고 진행하게 되었는데요 자바 언어와 관련 하여 다음과 같은 주제로 두시간에 걸쳐 발표를 진행합니다.
- 간단히 살펴보는 자바20년의 발자취
- 자바를 둘러싼 진실 혹은 거짓(성능,생산성,품질)
- SI영역 이외에서 자바의 가치
- 모던자바의 역습: 자바8과 함수형 프로그래밍
- 자바 개발의 새로운 패러다임들
Automatic Migration of Legacy Java Method Implementations to InterfacesRaffi Khatchadourian
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. In this talk, I will first overview several new, key features of Java 8 that can help make programs easier to read, write, and maintain, especially in regards to collections. These features include Lambda Expressions, the Stream API, and enhanced interfaces, many of which help bridge the gap between functional and imperative programming paradigms and allow for succinct concurrency implementations. Next, I will discuss several open issues related to automatically migrating (refactoring) legacy Java software to use such features correctly, efficiently, and as completely as possible. Solving these problems will help developers to maximally understand and adopt these new features thus improving their software.
At first glance, writing concurrent programs in Java seems like a straight-forward task. But the devil is in the detail. Fortunately, these details are strictly regulated by the Java memory model which, roughly speaking, decides what values a program can observe for a field at any given time. Without respecting the memory model, a Java program might behave erratic and yield bugs that only occure on some hardware platforms. This presentation summarizes the guarantees that are given by Java's memory model and teaches how to properly use volatile and final fields or synchronized code blocks. Instead of discussing the model in terms of memory model formalisms, this presentation builds on easy-to follow Java code examples.
Ahead-Of-Time Compilation of Java ApplicationsNikita Lipsky
Geekout 2016 presentation.
Ahead-of-time (AOT) native compilation has been available for .NET for quite some time, whereas Java SE, while being older than .NET, still does not have a standard AOT compiler. Some people ask why, some people think that it could only work for certain limited types of Java applications, some people think that it is not needed.
The truth, however, is that a Java AOT compiler has been available for over a decade, as part of a compliant Java SE implementation called Excelsior JET, and it proved to be useful for many organizations around the world. In this session, I would like to dispel the common myths about Java AOT compilation and show where it has advantages over JIT compilation from the technical point of view.
Java Course 7: Text processing, Charsets & EncodingsAnton Keks
Lecture 7 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Do you know the difference between charset & encoding? Every programmer nowadays MUST understand these terms, how they work, and how to use them. Otherwise we constantly face broken software refusing to work with international characters properly.
This session, delivered at Devoxx Poland, covers all the major changes to the Java platform between JDK 12 and JDK 17. All language features are covered, as well as many of the important API changes.
Lecture 3 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Discusses more Java basics and Object Oriented Programming.
Java 8 is one of the largest upgrades to the popular language and framework in over a decade. This talk will detail several new key features of Java 8 that can help make programs easier to read, write, and maintain. Java 8 comes with many features, especially related to collection libraries. We will cover such new features as Lambda Expressions, the Stream API, enhanced interfaces, and more.
Evento organizado pelo IEA polo Ribeirão Preto - USP.
Tema: Queimadas na Amazônia e seus efeitos no ecossistema e na saúde da população
Palestra do Prof. Dr. Paulo Artaxo Netto
Realizada em 26/08/2011
Evento organizado pelo Instituto de Estudos Avançados Polo Ribeirão Preto - USP.
Tema: Produção de etanol celulósico empregando enzimas fúngicas.
Palestra do Prof. Dr. João Atílio Jorge
Realizada em 10/03/2011.
IT kontraktsstrategi - Dataforeningens IT-kontraktsdag 2013Thor Jusnes
It's time to take a more holistic approach to contract strategy. This presentation describes a holistic approach, which places each contract in the context of a holistic contract strategy, not merely as part of an individual transaction.
Finally Java SE 7 is GA and you can start using it. This talk will cover the most important new features of the language and the virtual machine. It will also cover some features that did not make it in to the SE 7 release. Finally we will discuss current state of Java as an ecosystem and my analysis and hopes for the future.
In this workshop we would like to take a closer look at the new features of Java 7 and Java 8.
Java 7 has brought a couple of language enhancements to assist developers in their daily programming tasks and starting from Java 8 we finally have the opportunity to include a functional programming touch to Java thanks to Lambdas! Lambdas allow us to specify closures to create clean and brief solutions for which we would otherwise be obligated to write down a lot of boilerplate code.
For example in order to sort a List of Strings based on their length we can now write the following code:
Collections.sort(list, (s1, s2) -> s1.length() - s2.length());
Besides lambdas, Java 8 also comes with extension methods, allowing us to write interfaces containing implemented methods, streams and bulk data operations, granting us the opportunity to chain operations on collections to obtain a filtered or transformed set of the elements in our collection, and the possibility to pass functions as parameters. These features alone will have a major impact on the way how Java APIs can be written. There's also a brand new Date and Time API inspired on the popular JodaTime API and a couple of other language enhancements to aid Java developers in writing solutions in a more elegant way.
Be sure to follow this workshop to stay up to date with the latest evolutions of the Java programming language. Java 8 is definitely an update of the programming language which you don't want to miss out on!
www.denizoguz.com-For an in company JDK 7 orientation I have prepared a presentation which summaries new features of JDK 7. I would like to make it public for everyone who needs it.
This presentation outlines a number of the new features in Java 7, and some specific technologies delivered as part of IBM SDK for Java version 7.
Originally presented in Bangalore, India 2011
Java 9 is just around the corner. In this session, we'll describe the new modularization support (Jigsaw), new JDK tools, enhanced APIs and many performance improvements that were added to the new version.
Lecture 15 from the IAG0040 Java course in TTÜ.
See the accompanying source code written during the lectures: https://github.com/angryziber/java-course
Gives an overview of more advanced Java topics.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
2. What’s new in Java 7?
New Features in Java 7
• Dynamic Languages Support.
• Project Coin.
• Fork/Join Library.
• NIO2.
• Most important features (e.g., lambda functions,
modularization) are deferred to Java 8.
4
copyright 2011 Trainologic LTD
3. What’s new in Java 7?
New Bytecode Instruction
• Java 7 introduces a change in the JVM bytecode
instructions.
• This has not been done in many releases.
• The new bytecode instruction available in Java 7 is:
invokedynamic.
4
copyright 2011 Trainologic LTD
4. What’s new in Java 7?
Dynamic Languages Support
• Java 6 introduced the Scripting API for scripting support
for dynamic languages.
• Although you can create now applications that will run
scripts in many languages (e.g., Jython, Groovy,
JavaScript) compilation of dynamic languages is a
problem.
• Now, why is that?
4
copyright 2011 Trainologic LTD
5. What’s new in Java 7?
Dynamic Languages Support
• The current bytecode instructions only provide method
invocations that are strongly types (i.e., types of
arguments must be know in advance).
• That makes a burden on compilers for dynamic
languages and often results in performance degradation
and poor generated code.
• The new mechanism allows for dynamically generated
methods to be added and invoked.
4
copyright 2011 Trainologic LTD
6. What’s new in Java 7?
Project Coin
• Project Coin introduces changes to the syntax of the
Java language.
• Note that these are not major changes as were done in
Java 5.
• Let’s see what it is about…
4
copyright 2011 Trainologic LTD
7. What’s new in Java 7?
Project Coin
• Project Coin includes:
• Support for strings in switch statements.
• Binary numeric literals.
• Improved type inference.
• Multi-catch.
• Precise rethrow.
• ARM (Automatic Resource Management).
4
copyright 2011 Trainologic LTD
8. What’s new in Java 7?
Switch on Strings
• The current JVM does not allow switch on non integer
types.
• I.e., only int, short, byte, char and Enum are allowed.
• The new version will also support Strings.
• Now, this was done without altering the bytecode.
• I.e., by using compilation techniques.
• Let’s see an example…
4
copyright 2011 Trainologic LTD
9. What’s new in Java 7?
Example
• Switch on strings:
switch (str) {
case "a":
System.out.println("is a");
break;
case "bcd":
System.out.println("string is bcd");
break;
default:
System.out.println("couldn't match");
}
21
copyright 2011 Trainologic LTD
10. What’s new in Java 7?
Binary Literals
• Currently Java supports only decimal, octal and
hexadecimal numeric literals.
• Java 7 supports also binary literals:
int a = 0b0101;
int b = 0b1010;
System.out.println(a+b);
21
copyright 2011 Trainologic LTD
11. What’s new in Java 7?
Improved Type Inference
• While the Java compiler will not provide extensive type
inference (as in Scala), a minor inference improvement
is introduced in Java 7:
List<String> strings = new ArrayList<>();
21
copyright 2011 Trainologic LTD
12. What’s new in Java 7?
Multi-Catch
• One of the annoying things about exception handling in
Java is the need to duplicate exception handling code
for different exception types.
• This is addressed in Java 7 as mulit-catch.
• Let’s see it in action:
21
copyright 2011 Trainologic LTD
14. What’s new in Java 7?
Precise Rethrow
• Currently the following code will not compile:
public void foo() throws IOException, SQLException {
try {
// do something that may throw IOException or
// SQLException
} catch (Exception e) {
// do something
throw(e);
}
}
29
copyright 2011 Trainologic LTD
15. What’s new in Java 7?
Safe Re-throw
• The syntax to allow this is with the final keyword:
public void foo() throws IOException, SQLException {
try {
// do something that may throw IOException or
// SQLException
} catch (final Exception e) {
// do something
throw(e);
}
}
30
copyright 2011 Trainologic LTD
16. What’s new in Java 7?
ARM
• Automatic Resource Management will allow you to
specify a resource (AutoClosable type) to use with the
try-catch block.
• When you exist the try-catch block the close() method
will be invoked automatically.
• Let’s see it in action…
21
copyright 2011 Trainologic LTD
17. What’s new in Java 7?
Try with Resources
static class MyClass implements AutoCloseable {
@Override
public void close() throws Exception {
System.out.println("Close was called");
}
}
private static void trywith() {
MyClass resource1 = new MyClass();
MyClass resource2 = new MyClass();
try (resource1; resource2) {
System.out.println("in try");
} catch (Exception e) {
System.out.println("in catch");
}
}
29
copyright 2011 Trainologic LTD
18. What’s new in Java 7?
Concurrency Utils
• Doug Lea, the founder of the excellent
java.util.concurrent introduces (through JSR 166) the
following new features:
• Fork/Join framework.
• TransferQueue.
• ThreadLocalRandom.
• Phasers.
18
copyright 2011 Trainologic LTD
19. What’s new in Java 7?
Fork/Join
• The basic idea of the Fork/Join framework is that many
tasks can be split to several concurrent threads, and the
result should be merged back.
• Let’s take a look at an example…
19
copyright 2011 Trainologic LTD
20. What’s new in Java 7?
Fork/Join
• Instead of doing it single-threaded, the idea of fork/join
is to split the operation to several (depends on the # of
cores) concurrent threads.
public class Fibonacci extends RecursiveTask<Integer> {
private final int n;
public Fibonacci(int n) { this.n = n;}
protected Integer compute() {
if (n <= 1)
return n;
Fibonacci f1 = new Fibonacci(n - 1);
f1.fork();
Fibonacci f2 = new Fibonacci(n - 2);
return f2.compute() + f1.join();
}
}
20
copyright 2011 Trainologic LTD
21. What’s new in Java 7?
Example
• The Main class:
public class Main {
public static void main(String[] args) {
ForkJoinPool pool = new ForkJoinPool(3);
Fibonacci fibonacci = new Fibonacci(20);
pool.execute(fibonacci);
System.out.println(fibonacci.join());
}
}
21
copyright 2011 Trainologic LTD
22. What’s new in Java 7?
TransferQueue
• A BlockingQueue on which the producers await for a
consumer to take their elements.
• Usage scenarios are typically message passing
applications.
22
copyright 2011 Trainologic LTD
23. What’s new in Java 7?
Phasers
• “Beam me up, Scotty!”
• A Phaser is quite similar to CyclicBarrier and
CountDownLatch but is more powerful and flexible.
• A Phaser has an associated phase-number which is of
type int.
• A Phaser has a number of unarrived parties. Unlike
CyclicBarrier and CountDownLatch, this number is
dynamic.
23
copyright 2011 Trainologic LTD
24. What’s new in Java 7?
Phasers
• A Phaser supports operations for
arriving, awaiting, termination, deregistration and
registration.
• When all the parties arrive, the Phaser advances
(increments its phase-number).
• Phasers also supports ForkJoinTasks!
24
copyright 2011 Trainologic LTD
25. What’s new in Java 7?
NIO.2
• JSR 203 adds new APIs to the NIO package.
• Main features:
• Filesystem API.
• Asynchronous Channels.
25
copyright 2011 Trainologic LTD
26. What’s new in Java 7?
Filesystem API
• At the heart of the new filesystem API stands the Path
class.
• An instance of Path can be thought of as an improved
version of a File instance.
• Also, File now provides a method for legacy code
named: toPath().
• Let’s explore this class…
26
copyright 2009 Trainologic LTD
27. What’s new in Java 7?
Path
• Path is an abstract representation of an hierarchical
path from the filesystem provider.
• For regular filesystems, a Path is interoperable with File.
• For other providers (e.g., ZipFileSystemProvider) there
is no analogy.
• A Path instance also supports symbolic links and
provides the method: readSymbolicLink().
26
copyright 2009 Trainologic LTD
29. What’s new in Java 7?
Watchable
• Path implements the Watchable interface.
• This allows for registering watchers that are interested
in events on the Path.
• Example for events:
• OVERFLOW, ENTRY_CREATE, ENTRY_DELETE, ENTRY
_MODIFY.
• Let’s see an example for logging which files are deleted
on a given directory…
26
copyright 2009 Trainologic LTD
31. What’s new in Java 7?
Not Included
• The following (promised) features were not included in
Java 7:
• Lambda and Closures.
• Refied Generics.
• Modularization.
• Annotations on Java types.
• Collections literals.
38
copyright 2011 Trainologic LTD
32. What’s new in Java 7?
Java 8?
• So, what is intended for Java 8?
• Well, JSR 337 (Java 8) promises the following:
• Annotations on types.
• Lambdas.
• Parallel collections and support for lambdas in
collections.
• Date & time APIs.
• Module system.
38
copyright 2011 Trainologic LTD
33. What’s new in Java 7?
Proposed Lambda Syntax
• Following is the current state of JSR 335 (Lambda
expressions for Java):
Lambda for Runnable
executor.submit( #{ System.out.println("Blah") } );
Collections.sort(people, #{ Person x, Person y ->
x.getLastName().compareTo(y.getLastName()
) });
38
copyright 2011 Trainologic LTD