eBooks from David Flanagan
All books and eBooks by David Flanagan:
Java in a Nutshell
Chapter 1Introduction Introduction 1 Welcome to Java. This chapter begins by explaining what Java is and describing some of the features that distinguish it from other programming languages. Next, it outlines the structure of this book, with special emphasis on what is new in Java 5.0. Finally, as a quick tutorial introduction to the language, it walks you through a simple Java program you can type, compile, and run. What Is Java? In discussing Java, it is important to distinguish between the Java programming language, the Java Virtual Machine, and the Java platform. The Java program- ming language is the language in which Java applications, applets, servlets, and components are written. When a Java program is compiled, it is converted to byte codes that are the portable machine language of a CPU architecture known as the Java Virtual Machine (also called the Java VM or JVM). The JVM can be
(2007)
Java Examples in a Nutshell
Chapter 1Java Basics Java Basics 1 This chapter contains examples that demonstrate the basic syntax of Java; it is meant to be used in conjunction with Chapter 2 of Java in a Nutshell. If you have substantial programming experience with C or C++, you should find the material in this chapter straightforward. If you are coming to Java from another language, however, you may need to study the examples here more carefully. The most important step in learning a new programming language is mastering the basic control statements of the language. With Java, this means learning the if/else branching statement and the while and for looping statements. Learning to program well is like learning to do word problems in high-school algebra class: you have to translate the problem from an abstract description into the concrete language of algebra (or, in this case, the language of Java). Once you learn to
(2007)
JavaScript Pocket Reference
Semicolons JavaScript statements are terminated by semicolons. When a statement is followed by a newline, however, the terminat- ing semicolon may be omitted. Note that this places a restric- tion on where you may legally break lines in your JavaScript programs: you may not break a statement across two lines if the first line can be a complete legal statement on its own. Comments JavaScript supports both C and C++ comments. Any amount of text, on one or more lines, between /* and */ is a com- ment, and is ignored by JavaScript. Also, any text between // and the end of the current line is a comment, and is ignored. Examples: // This is a single-line, C++-style comment. /* * This is a multi-line, C-style comment. * Here is the second line. */ /* Another comment. */ // This too. Identifiers Variable, function, and label names are JavaScript identifiers.
(2002)
Java Foundation Classes ...
A Desktop Quick Reference
Java™ Foundation Classes in a Nutshell by David Flanagan Copyright © 1999 O’Reilly Media, Inc. All rights reserved. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. Editor: Paula Ferguson Production Editor: Nicole Arigo Production Services: Nancy Crumpton Printing History: September 1999: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks and the Java™ series is a trademark of O’Reilly Media, Inc. The In a Nutshell series designations, Java™ Foundation Classes in a Nutshell, the image of a Florida panther, and related trade dress are trademarks of O’Reilly Media, Inc. Java™ and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc., in the United States and other countries. O’Reilly Media, Inc. is independent of Sun Microsystems. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations
(2009)
JavaScript: The Definiti...
The Definitive Guide
Chapter 1 CHAPTER 1 Introduction to JavaScript 1 JavaScript is an interpreted programming language with object-oriented (OO) capa- bilities. Syntactically, the core JavaScript language resembles C, C++, and Java, with programming constructs such as the if statement, the while loop, and the && opera- tor. The similarity ends with this syntactic resemblance, however. JavaScript is a loosely typed language, which means that variables do not need to have a type speci- fied. Objects in JavaScript map property names to arbitrary property values. In this way, they are more like hash tables or associative arrays (in Perl) than they are like structs (in C) or objects (in C++ or Java). The OO inheritance mechanism of Java- Script is prototype-based like that of the little-known language Self. This is quite dif- ferent from inheritance in C++ and Java. Like Perl, JavaScript is an interpreted language, and it draws inspiration from Perl in
(2008)
JavaScript Pocket Reference
JavaScript Pocket Reference, Second Edition by David Flanagan Copyright © 2003, 1998 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly Media, Inc. books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editor: Paula Ferguson Production Editor: Philip Dangler Cover Designer: Edie Freedman Interior Designer: David Futato Printing History: October 1998: First Edition November 2002: Second Edition Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Pocket Reference series designation, JavaScript Pocket Reference, Second Edition, the image of a rhinoceros, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish
(2008)
Java 5.0 Tiger: A Develo...
A Developer's Notebook
by Brett McLaug... and David Flanagan
Java 5.0 Tiger: A Developer’s Notebook™ by Brett McLaughlin and David Flanagan Copyright © 2004 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com. Editor: Brett McLaughlin Production Editor: Reg Aubry Cover Designer: Edie Freedman Interior Designer: Melanie Wang Printing History: June 2004: First Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Developer’s Notebook series designations, Java 5.0 Tiger: A Developer’s Notebook, the look of a laboratory notebook, and related trade dress are trademarks of O’Reilly Media, Inc. Java™ and all Java-based trademarks and logos are trademarks or registered trademarks
(2009)
The Ruby Programming Lan...
Ruby Programming Language
by David Flanagan and Yukihiro Mat...
Preface This book is an updated and expanded version of Ruby in a Nutshell (O’Reilly) by Yukihiro Matsumoto, who is better known as Matz. It is loosely modeled after the classic The C Programming Language (Prentice Hall) by Brian Kernighan and Dennis Ritchie, and aims to document the Ruby language comprehensively but without the formality of a language specification. It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to take their under- standing and mastery of the language to the next level. You’ll find a guide to the structure and organization of this book in Chapter 1. Acknowledgments David Flanagan Before anything else, I must thank Matz for the beautiful language he has designed, for his help understanding that language, and for the Nutshell that this book grew out of. Thanks also to: • why the lucky stiff for the delightful
(2008)

