|2020ok Directory of FREE Online Books and FREE eBooks|
The Java Tutorial: Object-Oriented Programming for the Internet
by Mary Campione And Kathy Walrath
(Respecting the intellectual property of others is utmost important to us, we make every effort to make sure we only link to legitimate sites, such as those sites owned by authors and publishers. If you have any questions about these links, please contact us.)
Some of the best sources for learning Java are online. The Java Tutorial, Second Edition is an updated compilation of online resources from the JavaSoft Web site, edited for clarity. This guide gives you the advantage of having all you need to learn Java in one book (and includes a CD-ROM).
The authors organize the book's sections around lessons and "trails" (which correspond to online tutorials). Beginners will find the sections on running simple Java applications and applets and on the nuts and bolts of the Java programming language especially useful. However, there is plenty of expertise here for the Java expert. (Because this is all "official" JavaSoft material, it gives excellent perspective on the ideal use of Java--100 percent pure programming that runs on all hardware platforms.) For example, the sections on using the JavaStream classes present some hard-to-find material on memory streams and pipes.
Additional topics discuss how to get around the basics of creating user interfaces with AWT classes (though this is less useful because most programmers will use a Java compiler that handles the details of inner classes and adapters for them). Chapters on graphics programming benefit both beginners and experts and include a great explanation of image filters and animation techniques.
Some of the niftiest stuff in The Java Tutorial is presented in the sections on network programming in Java, with a clear explanation of reading and writing to URLs and working with sockets. (These capabilities are all built in to Java, and this tutorial shows you how to execute them.) The book finishes up with a discussion of new features in JDK 1.2--still under development--and with the printed source code for all the examples in the book. This book makes a good argument that print still has its advantages. You'd spend hours digging up the relevant tutorials online. --Richard V. Dragan
This book is a practical tutorial to writing programs with JDK 1.1. This book guides the reader through a series of exercises that allow first- time Java developers to become efficient Java Programmers.
From the Inside Flap
Since the release of the JDK 1.0.2 in May of 1996, the Java engineering team has been hard at work improving and enhancing the Java platform. We have been similarly laboring to update The Java Tutorial to reflect the work of the engineers. From the first page to the last, this edition now documents the APIs in JDK 1.1. We have fully integrated JDK 1.1 updates into the text, plus we've added coverage of some of the new features of 1.1 such as the new AWT event model, object serialization, and inner classes. We also added a new trail to the end of the book that provides a summary of what changed for 1.1, information to help you decide when to convert 1.0 programs to 1.1, and instructions about how to perform the conversion. And finally we've included a preview of what's likely to come in the next major release of the JDK.
Yet, this edition of The Java Tutorial is more than just an update of the previous edition. It's more polished and mature. We have rewritten, clarified, and reorganized many areas of the book based on feedback from readers and reviewers.
Like the first edition, this book is based on the online tutorial hosted at the Java Web site.At that time, it contained a few basic lessons on writing applets, the fundamentals of the language itself, and some key classes. Since then, the tutorial has grown to over 10MB of HMTL files, images, and running programs. It contains dozens of lessons covering topics ranging from applet communication to security, from internationalization to JavaBeansTM. We are constantly updating the online version of the tutorial to cover new APIs developed by the engineering team.
Like the online version, this book reflects the latest Java advances. However, unlike the online version, page count limits what this book can cover. Hence, it focuses on the Java APIs needed by most beginning to intermediate Java programmers. If you don't find information in this book about part of the Java platform, check our Web site for it.
From the online tutorial to the first edition, and from the first edition to the second, our intent has always been to create a fun, easy-to-read, task-oriented programmer's guide with lots of practical examples to help people learn to program in Java. Who Should Read This Book?
This tutorial assumes that you have some programming experience, whether it be traditional procedural programming or object-oriented programming, and are familiar with programming tenets and terminology and at least one high-level language.
All Java programmers--novice and experienced alike--can benefit from this book. The first section begins with an overview of the Java platform and what it can help you do. It then presents two Java programs--one application and one applet--and shows you how to compile and run both. Finally, it describes how they work.
From this hands-on beginning, you can follow your own course of learning: New programmers can benefit most by reading the book from beginning to end, including the beginning material on object-oriented concepts, the standard features of the Java language, and the object-oriented features of the Java language. Programmers experienced with procedural languages such as C may wish to skip the section that describes the standard features of Java and start with the material on object-oriented concepts and the object-oriented features of Java. Experienced object programmers may want to jump feet first into more advanced trails, such as those on applets, essential classes, or UIs.
No matter what type of programmer you are, you can find a path through this book that fits your learning requirements. What You Need
This book documents the JDK 1.1 release of the Java platform. To compile and run the examples in this book you need a development environment that is compatible with JDK 1.1. You can use a commercially-available Java development environment or you can use the JDK itself.
You can use the version of JDK 1.1 that's on the CD-ROM accompanying this book.For testing applets, you can use a special limited browser called the Applet Viewer that ships with the JDK. For information about the browsers that are currently available and support 1.Also, the editor must allow you to specify both uppercase and lowercase letters in the filename. Acknowledgments For the Second Edition of the Tutorial
Many Internet readers have helped us maintain and improve the quality of the tutorial by sending us e-mail and cheerfully pointing out our numerous typos, broken links, and more importantly, areas of the tutorial that caused confusion or could benefit from rewriting.
Many members of the Java engineering and documentation team have given us counsel, answered our many questions, reviewed our material, and even made contributions to it. They also make JavaSoft a fun place to work. The list is long but we'd particularly like to note the contributions of Brian Beck, Joshua Bloch, David Connelly, Chris Darke, Bill Foote, Carol Hayes, Herb Jellinek, Doug Kramer, Marianne Mueller, Marla Parker, Mark Reinhold, John Rose, John Wegis, and Beth Whitman. Kathy would like to thank all the members of the Swing engineering team for being such a great group to work with. And, notably, Ron Mandel, who kept our Macs and PCs operating in a mostly Sun environment.
We are grateful for the other writers at Sun who have contributed to the online tutorial as guest authors. So far this list of professional and talented writers includes Mary Dageforde, Andy Quinn, Beth Stearns, and Greg Voss.
The Java language wouldn't exist without its creator, James Gosling. We'd like to thank James, not only for creating the language but also for staying involved as the Java platform develops. On a personal note, we'd like to thank him for accepting an award for us from JavaWorld (who named the tutorial as one of three finalists in the Best Training Aid category).
Our team managers, Lisa Friendly, Rick Levenson, and Stans Kleijnen, create a work environment that lets us get our job done. We especially appreciate their support of flexible, if a bit unusual, work arrangements.
Mike Hendrickson, our editorial advisor at Addison-Wesley, is always a calming influence and keeps us on schedule. Sarah Weaver was the production manager on the book and Laura Michaels was our copy editor and grammar queen. The whole team at Addison-Wesley have been a pleasure to work with and continually strive for excellence on this and the other books in the series.
Our heartfelt appreciation goes to the newest member of the tutorial team, Alison Huml, who calmly and professionally managed this edition of the book. She managed our schedule, handled the relationship with the copy editor, incorporated copy edits, drew or fixed many diagrams and images in the book, and handled all of the PC and Mac file conversions--all within the first month of working with us. Alison provides us with a fresh perspective and renewed energy. We look forward to her contributions to future book projects and to the online version of the tutorial. For the First Edition of the Tutorial
Of course, the Java team made everything possible by creating Java in the first place. But many individuals contributed to getting this book out the door.
A million thanks go to the Java team members who answered questions, reviewed material, and in some cases, contributed examples--all of this in the face of tight deadlines: Thomas Ball, Brenda Bowden, David Brown, Patrick Chan, Tom Chavez, David Connelly, Pavani Diwanji, Amy Fowler, Jim Graham, Herb Jellinek, Jonni Kanerva, Doug Kramer, Eugene Kuerner, Tim Lindholm, Ron Mandel, Henry McGilton, Marianne Mueller, Scott Rautmann, Benjamin Renaud, Hassan Schroeder, Richard Scorer, Sami Shaio, Arthur van Hoff, Frank Yellin, and Steve Zellers.
Painful though they may have been, the feedback our reviewers provided us was invaluable. These reviewers were Mike Ballantyne, Richard Campione, Lee Collins, Greg Crisp, Matt Fahrner, Murali Ghanta, Bill Harts, Eileen Head, Murali Murugan, Roberto Quijalvo, Philip Resnik, Roger Riggs, Roman Rorat, Neil Sundaresan, Michael Weiss, the ones who preferred to remain anonymous, and all of the Internet readers who were kind enough to take the time to send us e-mail to let us know of problem areas.
Chris Warth spent several weeks writing scripts and filters to convert our complex web of HTML pages into MIF format. He was most patient with us despite our demands and changes. Marsh Chamberlain designed and created our trail icons, and Jan Kaerrman provided us with the html2ps script, which we used to create PostScript files from HTML and print our first review copy of the manuscript. Nathan Walrath created the figure in the Trail Map section. When we both went on maternity leave after giving the book to Addison-Wesley, Randy Nelson served as our backup, taking care of the CD-ROM and the Web site for the tutorial.
The staff at Addison-Wesley--Mike Hendrickson, Katie Duffy, Pamela Yee, and Marty Rabinowitz--were professional, competent, and courteous throughout the development of this book and provided us with guidance, encouragement, and instruction. They also managed the practical things like copy editing, page design, graphics, and reviewers so that all we had to do was worry about content.
Lisa Friendly, the Java Series editor, our manager, and our friend, made this book possible by suggesting that we turn the online tutorial into a book. She kept us calm, reassured us often, and managed everything, from our relationship with Addison-Wesley to consistency with other books in the series. Without her encouragement and hard work, this tutorial would not exist. About the Dedication
Mary: This book is dedicated to my husband, Richard Campione, for being my greatest friend. It's also dedicated to Sophia, a delightful child and a constant reminder of what's truly important.
Kathy: This book is dedicated to my husband, Nathan Walrath, and to our children, Laine and Cosmo. Nathan has done whatever it takes to help me write this book, from distracting kids to dispensing advice and art criticism. Laine and Cosmo are not old enough to help--quite the opposite--but like their dad, they sure are fun. 0201310074P04062001
Follow your own path to expertise with this self-guided tour of the Javaâ¢ programming language. Written by two members of the JavaSoft team at Sun Microsystems, the book employs a hands-on interactive approach to teaching Java basics, object-oriented concepts, applet programming, and everything else you need to know to become a proficient Java programmer.
Through a task-oriented, example-driven approach, The Javaâ¢ Tutorial introduces you to fundamental concepts and applications. Designed so that you can customize your own path through the specific information you need, the book explains the nuts and bolts of the language, applet construction, and the fundamental Java classes. You will also learn about more advanced topics such as creating a graphical user interface (GUI), using multiple threads, and working with Java's networking capabilities.
This Second Edition has been extensively updated to cover API changes in Java 1.1 regarding UI, networking, and I/O, and to include the latest Java language developments. New and updated material includes:
In addition, the Second Edition has been revised and reorganized to offer a stronger and more cohesive presentation, making this best-selling and award-winning book even better. The Tutorial now starts with a new lesson that introduces you to the Java phenomenon and provides a foundation for understanding the rest of the book.
The accompanying CD-ROM contains the Tutorial and all its code samples, versions of the Java Development Kitâ¢ (JDK) and the JDK documentation for each major platform, and the HotJavaâ¢ Browser. On the CD, the HTML version of the book is browser-friendly and contains information not found in the printed text, such as draft lessons on internationalizing Java programs, calling non-Java libraries from Java programs, using the security API, developing JavaBeansâ¢ components, and using the GUI components in the Swing/JFC package.
About the Author
Mary Campione was formerly a senior technical writer at Sun Microsystems, where she started writing about the Java platform in 1995. Mary graduated from California Polytechnic, San Luis Obispo, with a B.S. in Computer Science and has worked as both a technical writer and programmer. Kathy Walrath is a senior technical writer on the Swing team at Sun Microsystems. After graduating from the University of California, Berkeley, with a B.S. in Electrical Engineering and Computer Science, Kathy wrote extensively about Unix, Mach, and NextStep. Since 1993, Kathy has been writing specifications and how-to guides for the Java platform.
Related Free eBooks