Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 385 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
385
Dung lượng
3,54 MB
Nội dung
[...]... the display of digits 336 JavaBean enhancements in Java7 339 342 Handling locales and the Locale.Builder class in Java7 Handling null references 346 352 Using the new BitSet methods in Java7 Index 355 iv Preface With the release of Java 7, numerous newfeatures have been added that significantly improve the developer's ability to create and maintain Java applications These include language improvements,... Re-throwing exceptions in Java7 ff Using the diamond operator for constructor type inference ff Using the @SafeVarargs annotation Introduction Java7 was released in July of 2011 and introduced a number of newfeatures 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 newfeatures using a series of recipes Each recipe addresses one or more newfeatures 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 Java7 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 newfeatures 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 newJava7features 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 Java7 to address the creation of a GUI interface It is now possible to... This chapter demonstrates many other Java7 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 Java7 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 Java7 Using the Currency class in Java7 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