HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The release of Java SE 8 introduced significant enhancements that impact the Core Java technologies and APIs at the heart of the Java platform. Many old Java idioms are no longer required and new features like lambda expressions will increase programmer productivity, but navigating these changes can be challenging.
Core Java® for the Impatient is a complete but concise guide to Java SE 8. Written by Cay Horstmann—the author of Java SE 8 for the Really Impatient and Core Java™, the classic, two-volume introduction to the Java language—this indispensable new tutorial offers a faster, easier pathway for learning the language and libraries. Given the size of the language and the scope of the new features introduced in Java SE 8, there’s plenty of material to cover, but it’s presented in small chunks organized for quick access and easy understanding.
If you’re an experienced programmer, Horstmann’s practical insights and sample code will help you quickly take advantage of lambda expressions (closures), streams, and other Java language and platform improvements. Horstmann covers everything developers need to know about modern Java, including
Whether you are just getting started with modern Java or are an experienced developer, this guide will be invaluable for anyone who wants to write tomorrow’s most robust, efficient, and secure Java code.
How to Become a Better Java Developer
Please visit the author's site here
Interfaces and Lambda Expressions in Java
Download the sample pages (includes Chapter 3 and Index)
Preface xxi
Acknowledgments xxiii
About the Author xxv
Chapter 1: Fundamental Programming Structures 1
1.1 Our First Program 2
1.2 Primitive Types 7
1.3 Variables 10
1.4 Arithmetic Operations 13
1.5 Strings 20
1.6 Input and Output 26
1.7 Control Flow 30
1.8 Arrays and Array Lists 37
1.9 Functional Decomposition 46
Exercises 49
Chapter 2: Object-Oriented Programming 53
2.1 Working with Objects 54
2.2 Implementing Classes 58
2.3 Object Construction 63
2.4 Static Variables and Methods 68
2.5 Packages 72
2.6 Nested Classes 79
2.7 Documentation Comments 84
Exercises 89
Chapter 3: Interfaces and Lambda Expressions 93
3.1 Interfaces 94
3.2 Static and Default Methods 99
3.3 Examples of Interfaces 102
3.4 Lambda Expressions 107
3.5 Method and Constructor References 110
3.6 Processing Lambda Expressions 112
3.7 Lambda Expressions and Variable Scope 116
3.8 Higher-Order Functions 120
3.9 Local Inner Classes 122
Exercises 124
Chapter 4: Inheritance and Reflection 127
4.1 Extending a Class 128
4.2 Object: The Cosmic Superclass 137
4.3 Enumerations 147
4.4 Runtime Type Information and Resources 151
4.5 Reflection 160
Exercises 169
Chapter 5: Exceptions, Assertions, and Logging 173
5.1 Exception Handling 174
5.2 Assertions 185
5.3 Logging 187
Exercises 194
Chapter 6: Generic Programming 199
6.1 Generic Classes 200
6.2 Generic Methods 201
6.3 Type Bounds 202
6.4 Type Variance and Wildcards 203
6.5 Generics in the Java Virtual Machine 208
6.6 Restrictions on Generics 211
6.7 Reflection and Generics 218
Exercises 221
Chapter 7: Collections 227
7.1 An Overview of the Collections Framework 228
7.2 Iterators 232
7.3 Sets 233
7.4 Maps 235
7.5 Other Collections 238
7.6 Views 244
Chapter 8: Streams 249
8.1 From Iterating to Stream Operations 250
8.2 Stream Creation 251
8.3 The filter, map, and flatMap Met