Tài liệu Java 7 New Features Cookbook ppt

385 824 0
Tài liệu Java 7 New Features Cookbook ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... the display of digits 336 JavaBean enhancements in Java 7 339 342 Handling locales and the Locale.Builder class in Java 7 Handling null references 346 352 Using the new BitSet methods in Java 7 Index 355 iv Preface With the release of Java 7, numerous new features have been added that significantly improve the developer's ability to create and maintain Java applications These include language improvements,... Re-throwing exceptions in Java 7 ff Using the diamond operator for constructor type inference ff Using the @SafeVarargs annotation Introduction Java 7 was released in July of 2011 and introduced a number of new features In the Java SDK documentation, you may see it referred to as Java 1 .7 This chapter will focus on those that have been grouped as part of the Project Coin (http://openjdk .java net/projects/coin/)... improvements, such as better exception handling techniques, and additions to the Java core libraries, such as new threading mechanisms This cookbook covers these new features using a series of recipes Each recipe addresses one or more new features and provides a template for using these features This should make it easier to understand the features along with when and how they can be used Step-by-step instructions... event handlers 262 Introduction 2 67 Using the RowSetFactory class 270 Java 7 database enhancements 273 Using the ExtendedSSLSession interface 278 Using the platform MXBeans for JVM or system process load monitoring 283 Redirecting input and output from operating system's processes 2 87 Embedding a JNLP file in an HTML page 291 Introduction 2 97 Using join/fork framework in Java 299 Using the reusable synchronization... execute from within a main method While no specific Integrated Development Environment (IDE) is needed to use the new features of Java 7, the examples in this book were developed using NetBeans 7. 0.1 and Windows 7, unless otherwise noted At minimum, a version of the Java Development Kit (JDK) 1 .7 or later is needed Also, note that the code examples provided do not include import statements These are not... cover the first chapter, as many of the features found there will be used in subsequent recipes If other new Java 7 features are used in a recipe, then cross references are provided to the related recipes What this book covers Chapter 1, Java Language Improvements: In this chapter, we examine the various language improvements introduced as part of Project Coin These features include simple improvements... work with a ZIP file system are presented Chapter 6, Stream IO in Java 7: NIO2 is introduced New techniques for performing asynchronous IO are detailed along with new approaches for performing random access IO and using a secure directory stream Chapter 7, Graphical User Interface Improvements: There have been several additions to Java 7 to address the creation of a GUI interface It is now possible to... This chapter demonstrates many other Java 7 improvements such as new support for week, years, and currency Also included in this chapter is the improved support for dealing with null references What you need for this book The software required for this book includes the Java Development Kit (JDK) 1 .7 or later Any integrated development environment that supports Java 7 can be used to create and execute... Chapter 7: Graphical User Interface Improvements 213 Chapter 8: Handling Events 2 47 Chapter 9: Database, Security, and System Enhancements 2 67 Chapter 10: Concurrent Processing 2 97 Introduction 213 2 17 Mixing heavyweight and lightweight components Managing window types 219 Managing the opacity of a window 222 224 Creating a varying gradient translucent window Managing the shape of a window 2 27 Using the new. .. Using the new ConcurrentLinkedDeque safely with multiple threads 312 Using the new LinkedTransferQueue class 319 Supporting multiple threads using the ThreadLocalRandom class 325 iii Table of Contents Chapter 11: Odds and Ends 329 Introduction 329 332 Handling weeks in Java 7 Using the Currency class in Java 7 335 Using the NumericShaper.Range enumeration to support the display of digits 336 JavaBean . h0" alt="" Java 7 New Features Cookbook Over 100 comprehensive recipes to get you up-to-speed with all the exciting new features of Java 7 Richard M Enhancements 2 67 Introduction 2 67 Using the RowSetFactory class 270 Java 7 database enhancements 273 Using the ExtendedSSLSession interface 278 Using the

Ngày đăng: 14/02/2014, 12:20

Từ khóa liên quan

Mục lục

  • Cover

  • Copyright

  • Credits

  • About the Authors

  • Acknowledgement

  • About the Reviewers

  • www.PacktPub.com

  • Table of Contents

  • Preface

  • Chapter 1: Java Language Improvements

    • Introduction

    • Using string literals in switch statements

    • Using underscores in literals to improve code readability

    • Using the try-with-resources block to improve exception handling code

    • Creating a resource that can be used with the try-with-resources technique

    • Catching multiple exception types to improve type checking

    • Rethrowing exceptions in Java 7

    • Using the diamond operator for constructor type inference

    • Using the @SafeVarargs annotation

    • Chapter 2: Locating Files and Directories Using Paths

      • Introduction

      • Creating a Path object

Tài liệu cùng người dùng

Tài liệu liên quan