Java programming language was originally called Oak, was designed for use in embedded consumer-electronic applications by James Gosling. After several years experience with language, significant contributions by Ed Frank, Patrick Naughton, Jonathan Payne, Chris Warth it was retargeted to Internet, renamed, substantially revised to be language specified here. final form language was defined by James Gosling, Bill Joy, Guy Steele, Richard Tuck, Frank Yellin, Arthur van Hf, with help from Graham Hamilton, Tim Lindholm, many or friends colleagues. Java programming language is a general-purpose concurrent class-based object-oriented programming language, specifically designed to have as few implementation dependencies as possible. It allows application developers to write a program once n be able to run it everywhere on Internet. This book attempts a complete specification syntax semantics language. intend that behavior every language construct is specified here, so that all implementations will accept same programs. Except for timing dependencies or or non-determinisms given sufficient time sufficient memory space, a program written in Java programming language should compute same result on all machines in all implementations. We believe that Java programming language is a mature language, ready for widespread use. Neverless, we expect some evolution language in years to come. We intend to manage this evolution in a way that is completely compatible with existing applications. To do this, we intend to make relatively few new versions language, to distinguish each new version with a different filename extension. Compilers systems will be able to support several versions simultannously, with complete compatibility. Much research experimentation with Java platform is already underway. We encourage this work, will continue to cooperate with external groups to explore improvements to language platform. For example, we have already received several interesting proposals for parameterized types. In technically difficult areas, near state art, this kind research collaboration is essential. We acknowledge thank many people who have contributed to this book through ir excellent feedback, assistance encouragement: Particularly thorough, careful, thoughtful reviews drafts were provided by Tom Cargill, Peter Deutsch, Paul Hilfinger, Masayuki Ida, David Moon, Steven Muchnick, Charles L. Perkins, Chris Van Wyk, Steve Vinoski, Philip Wadler, Daniel Weinreb, Kenneth Zadeck. We are very grateful for ir extraordinary volunteer efforts. We are also grateful for reviews, questions, comments, suggestions from Stephen Adams, Bowen Alpern, Glenn Ammons, Leonid Arbuzov, Kim Bruce, Edwin Chan, David Chase, Pavel Curtis, Drew Dean, William Dietz, David Dill, Patrick Dussud, Ed Felten, John Giannrea, John Gilmore, Charles Gust, Warren Harris, Lee Hasiuk, Mike Hendrickson, Mark Hill, Urs Hoelzle, Roger Hoover, Susan Flynn Hummel, Christopher Jang, Mick Jordan, Mukesh Kacker, Peter Kessler, James Larus, Derek Lieber, Bill McKeeman, Steve Narf, Evi Nemeth, Robert O'Callahan, Dave Papay, Craig Partridge, Scott Pfeffer, Eric Raymond, Jim Roskind, Jim Russell, William Scherlis, Edith Schonberg, Anthony Scian, Matw Self, Janice Shepherd, Kathy Stark, Barbara Steele, Rob Strom, William Waite, Greg Weeks, Bob Wilson. (This list was generated semi-automatically from our E-mail records. We apologize if we have omitted anyone.) feedback from all se reviewers was invaluable to us in improving definition language as well as form presentation in this book. We thank m for ir diligence. Any remaining errors in this book-we hope y are few-are our responsibility not irs. We thank Francesca Freedman Doug Kramer for assistance with matters typography layout. We thank Dan Mills Adobe Systems Incorporated for assistance in exploring possible choices typefaces. Many our colleagues at Sun Microsystems have helped us in one way or anor. Lisa Friendly, our series editor, managed our relationship with Addison-Wesley. Susan Stambaugh managed distribution many hundreds copies drafts to reviewers. We received valuable assistance technical advice from Ben Adida, Ole Agesen, Ken Arnold, Rick Cattell, Asmus Freytag, Norm Hardy, Steve Heller, David Hough, Doug Kramer, Nancy Lee, Marianne Mueller, Akira Tanaka, Greg Tarsy, David Ungar, Jim Waldo, Ann Wollrath, Gef Wyant, Derek White. We thank Alan Baratz, David Bowen, Mike Clary, John Doerr, Jon Kannegaard, Eric Schmidt, Bob Sproull, Bert Surl, Scott McNealy for leadership encouragement. on-line Bartleby Library Columbia University, at URL: http://www.cc.columbia.edu/acis/bartleby/ was invaluable to us during process researching verifying many quotations that are scattered throughout this book. Here is one example: y lard ir lean books with fat ors' works. -Robert Burton (1576-1640) We are grateful to those who have toiled on Project Bartleby, for saving us a great deal effort reawakening our appreciation for works Walt Whitman. We are thankful for tools services we had at our disposal in writing this book: telephones, overnight delivery, desktop workstations, laser printers, photocopiers, text formatting page layout stware, fonts, electronic mail, World Wide Web, , course, Internet. We live in three different states, scattered across a continent, but collaboration with each or with our reviewers has seemed almost effortless. Kudos to thouss people who have worked over years to make se excellent tools services work quickly reliably. Mike Hendrickson, Katie Duffy, Simone Payment, Rosa Aimée González Addison-Wesley were very helpful, encouraging, patient during long process to bringing this book to print. We also thank copy editors. Rosemary Simpson worked hard, on a very tight schedule, to create index. We got into act at last minute, however; blame us not her for any jokes you may find hidden rein. Finally, we are grateful to our families friends for ir love support during this last, crazy, year. In ir book C Programming Language, Brian Kernighan Dennis Ritchie said that to y felt that C language "wears well as one's experience with it grows." If you like C, we think you will like Java programming language. We hope that it, too, wears well for you. James Gosling Cupertino, California Bill Joy Aspen, Colorado Guy Steele Chelmsford, Massachusetts July, 1996