Summary
This revised edition of the classicCore Javatrade;, Volume IFundamentals, is the definitive guide to Java for serious programmers who want to put Java to work on real projects. Fully updated for the new Java SE 6 platform, this no-nonsense tutorial and reliable reference illuminates the most important language and library features with thoroughly tested real-world examples. The example programs have been carefully crafted to be easy to understand as well as useful in practice, so you can rely on them as an outstanding starting point for your own code. Volume I is designed to quickly bring you up to speed on whatrs"s new in Java SE 6 and to help you make the transition as efficiently as possible, whether yours"re upgrading from an earlier version of Java or migrating from another language. The authors concentrate on the fundamental concepts of the Java language, along with the basics of user-interface programming. Yours"ll find detailed, insightful coverage of Java fundamentals Object-oriented programming Interfaces and inner classes Reflection and proxies The event listener model GUI programming with Swing Packaging applications Exception handling Logging and debugging Generic programming The collections framework Concurrency For detailed coverage of XML processing, networking, databases, internationalization, security, advanced AWT/Swing, and other advanced features, look for the forthcoming eighth edition ofCore Javatrade;, Volume II-Advanced Features(ISBN: 978-0-13-235479-0 ).
Author Biography
Cay S. Horstmann is also coauthor of Core JavaServer Faces, Second Edition (Prentice Hall, 2007). Cay is a professor of computer science at San Jose State University, a Java Champion, and a frequent speaker at computer industry conferences.
Gary Cornell has been writing and teaching programming professionals for more than twenty years and is the cofounder of Apress. He has written numerous best-selling books for programming professionals, was a cofinalist for a Jolt Award, and won the Readers Choice award from Visual Basic Magazine.
Table of Contents
Preface | |
Acknowledgments | |
An Introduction to Java | |
The Java Programming Environment | |
Fundamental Programming Structures in Java | |
Objects and Classes | |
Inheritance | |
Interfaces and Inner Classes | |
Graphics Programming | |
Event Handling | |
User Interface Components with Swing | |
Deploying Applications and Applets | |
Exceptions and Debugging | |
Generic Programming | |
Collections | |
Multithreading | |
Appendix A | |
Index | |
Table of Contents provided by Publisher. All Rights Reserved. |
Excerpts
To the Reader In late 1995, the Java programming language burst onto the Internet scene and gained instant celebrity status. The promise of Java technology was that it would become theuniversal gluethat connects users with information, whether that information comes from web servers, databases, information providers, or any other imaginable source. Indeed, Java is in a unique position to fulfill this promise. It is an extremely solidly engineered language that has gained acceptance by all major vendors, except for Microsoft. Its built-in security and safety features are reassuring both to programmers and to the users of Java programs. Java even has built-in support that makes advanced programming tasks, such as network programming, database connectivity, and multithreading, straightforward. Since 1995, Sun Microsystems has released six major revisions of the Java Development Kit. Over the course of the last nine years, the Application Programming Interface (API) has grown from about 200 to over 3,000 classes. The API now spans such diverse areas as user interface construction, database management, internationalization, security, and XML processing. JDK 5.0, released in 2004, is the most impressive update of the Java language since the original Java release. The book you have in your hand is the first volume of the seventh edition of theCore Java 2book. With the publishing of each edition, the book followed the release of the Java Development Kit as quickly as possible, and each time, we rewrote the book to take advantage of the newest Java features. In this edition, we are enthusiastic users of generic collections, the enhanced for loop, and other exciting features of JDK 5.0. As with the previous editions of this book, westill target serious programmers who want to put Java to work on real projects.We still guarantee no nervous text or dancing tooth-shaped characters. We think of you, our reader, as a programmer with a solid background in a programming language.But you do not need to know C++ or object-oriented programming.Based on the responses we have received to the earlier editions of this book, we remain confident that experienced Visual Basic, C, or COBOL programmers will have no trouble with this book. (You don't even need any experience in building graphical user interfaces for Windows, UNIX, or the Macintosh.) What we do is assume you want to: Write real code to solve real problems and Don't like books filled with toy examples (such as toasters, fruits, or zoo animals) In this book you will find lots of sample code that demonstrates almost every language and library feature that we discuss. We kept the sample programs purposefully simple to focus on the major points, but, for the most part, they aren't fake and they don't cut corners. They should make good starting points for your own code. We assume you are willing, even eager, to learn about all the advanced features that Java puts at your disposal. For example, we give you a detailed treatment of: Object-oriented programming Reflection and proxies Interfaces and inner classes The event listener model Graphical user interface design with the Swing UI toolkit Exception handling Stream input/output and object serialization Generic programming With the explosive growth of the Java class library, a one-volume treatment of all the features of Java that serious programmers need to know is no longer possible. Hence, we decided to break the book up into two volumes. The first volume, which you hold in your hands, concentrates on the fundamental concepts of the Java language, along with the basics of user-interface programming. The second volume goes further into the enterprise features and advanced user-interface programming. It includes detai