Learning Java

Learning Java

by Patrick Niemeyer, Daniel Leuck

Paperback(Fourth Edition)

$53.99 $59.99 Save 10% Current price is $53.99, Original price is $59.99. You Save 10%.
View All Available Formats & Editions
Choose Expedited Shipping at checkout for guaranteed delivery by Thursday, March 28

Product Details

ISBN-13: 9781449319243
Publisher: O'Reilly Media, Incorporated
Publication date: 07/02/2013
Edition description: Fourth Edition
Pages: 977
Sales rank: 337,818
Product dimensions: 7.00(w) x 9.10(h) x 2.30(d)

About the Author

Patrick Niemeyer became involved with Oak (Java's predecessor) while working at Southwestern Bell Technology Resources. He is an independent consultant and author in the areas of networking and distributed applications. Pat is the author of BeanShell, a popular Java scripting language, as well as various other free goodies on the Net. Most recently, Pat has been developing enterprise architecture for A.G. Edwards. He currently lives in the Central West End area of St. Louis with various creatures.

Dan Leuck is the CEO of Ikayzo, a Tokyo and Honolulu-based interactive design and software development firm with customers including Sony, Oracle, Nomura, PIMCO and the federal government. He previously served as Senior Vice President of Research and Development for Tokyo-based ValueCommerce, Asia's largest online marketing company, Global Head of Development for London-based LastMinute.com, Europe's largest B2C website, and President of the US division of DML. Daniel has extensive experience managing teams of 150+ developers in five countries. He has served on numerous advisory boards and panels for companies such as Macromedia and Sun Microsystems. Daniel is active in the Java community, is a contributor to BeanShell, the project lead for SDL, and sits on numerous Java Community Process expert groups.

Table of Contents

Preface;
Who Should Read This Book;
New Developments;
Using This Book;
Online Resources;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Chapter 1: A Modern Language;
1.1 Enter Java;
1.2 A Virtual Machine;
1.3 Java Compared with Other Languages;
1.4 Safety of Design;
1.5 Safety of Implementation;
1.6 Application and User-Level Security;
1.7 A Java Road Map;
Chapter 2: A First Application;
2.1 Java Tools and Environment;
2.2 Configuring Eclipse and Creating a Project;
2.3 HelloJava;
2.4 HelloJava2: The Sequel;
2.5 HelloJava3: The Button Strikes!;
2.6 HelloJava4: Netscape’s Revenge;
Chapter 3: Tools of the Trade;
3.1 JDK Environment;
3.2 The Java VM;
3.3 Running Java Applications;
3.4 The Classpath;
3.5 The Java Compiler;
3.6 JAR Files;
3.7 Policy Files;
Chapter 4: The Java Language;
4.1 Text Encoding;
4.2 Comments;
4.3 Types;
4.4 Statements and Expressions;
4.5 Exceptions;
4.6 Assertions;
4.7 Arrays;
Chapter 5: Objects in Java;
5.1 Classes;
5.2 Methods;
5.3 Object Creation;
5.4 Object Destruction;
5.5 Enumerations;
Chapter 6: Relationships Among Classes;
6.1 Subclassing and Inheritance;
6.2 Interfaces;
6.3 Packages and Compilation Units;
6.4 Visibility of Variables and Methods;
6.5 Arrays and the Class Hierarchy;
6.6 Inner Classes;
Chapter 7: Working with Objects and Classes;
7.1 The Object Class;
7.2 The Class Class;
7.3 Reflection;
7.4 Annotations;
Chapter 8: Generics;
8.1 Containers: Building a Better Mousetrap;
8.2 Enter Generics;
8.3 “There Is No Spoon”;
8.4 Parameterized Type Relationships;
8.5 Casts;
8.6 Writing Generic Classes;
8.7 Bounds;
8.8 Wildcards;
8.9 Generic Methods;
8.10 Arrays of Parameterized Types;
8.11 Case Study: The Enum Class;
8.12 Case Study: The sort() Method;
8.13 Conclusion;
Chapter 9: Threads;
9.1 Introducing Threads;
9.2 Threading an Applet;
9.3 Synchronization;
9.4 Scheduling and Priority;
9.5 Thread Groups;
9.6 Thread Performance;
9.7 Concurrency Utilities;
9.8 Conclusion;
Chapter 10: Working with Text;
10.1 Text-Related APIs;
10.2 Strings;
10.3 Internationalization;
10.4 Parsing and Formatting Text;
10.5 Printf-Style Formatting;
10.6 Formatting with the java.text Package;
10.7 Regular Expressions;
Chapter 11: Core Utilities;
11.1 Math Utilities;
11.2 Dates and Times;
11.3 Timers;
11.4 Collections;
11.5 Properties;
11.6 The Preferences API;
11.7 The Logging API;
11.8 Observers and Observables;
Chapter 12: Input/Output Facilities;
12.1 Streams;
12.2 File I/O;
12.3 The NIO File API;
12.4 Serialization;
12.5 Data Compression;
12.6 The NIO Package;
Chapter 13: Network Programming;
13.1 Sockets;
13.2 Datagram Sockets;
13.3 Simple Serialized Object Protocols;
13.4 Remote Method Invocation;
13.5 Scalable I/O with NIO;
Chapter 14: Programming for the Web;
14.1 Uniform Resource Locators (URLs);
14.2 The URL Class;
14.3 Talking to Web Applications;
14.4 Web Services;
Chapter 15: Web Applications and Web Services;
15.1 Web Application Technologies;
15.2 Java Web Applications;
15.3 WAR Files and Deployment;
15.4 Servlet Filters;
15.5 Building WAR Files with Ant;
15.6 Implementing Web Services;
15.7 Conclusion;
Chapter 16: Swing;
16.1 Components;
16.2 Events;
16.3 Event Summary;
16.4 The AWT Robot!;
16.5 Multithreading in Swing;
Chapter 17: Using Swing Components;
17.1 Buttons and Labels;
17.2 Checkboxes and Radio Buttons;
17.3 Lists and Combo Boxes;
17.4 The Spinner;
17.5 Borders;
17.6 Menus;
17.7 Pop-Up Menus;
17.8 The JScrollPane Class;
17.9 The JSplitPane Class;
17.10 The JTabbedPane Class;
17.11 Scrollbars and Sliders;
17.12 Dialogs;
Chapter 18: More Swing Components;
18.1 Text Components;
18.2 Focus Navigation;
18.3 Tables;
18.4 Desktops;
18.5 Pluggable Look-and-Feel;
18.6 Creating Custom Components;
Chapter 19: Layout Managers;
19.1 FlowLayout;
19.2 GridLayout;
19.3 BorderLayout;
19.4 BoxLayout;
19.5 CardLayout;
19.6 GridBagLayout;
19.7 Other Layout Managers;
19.8 Absolute Positioning;
Chapter 20: Drawing with the 2D API;
20.1 The Big Picture;
20.2 The Rendering Pipeline;
20.3 A Quick Tour of Java 2D;
20.4 Filling Shapes;
20.5 Stroking Shape Outlines;
20.6 Using Fonts;
20.7 Displaying Images;
20.8 Drawing Techniques;
20.9 Printing;
Chapter 21: Working with Images and Other Media;
21.1 Loading Images;
21.2 Producing Image Data;
21.3 Filtering Image Data;
21.4 Saving Image Data;
21.5 Simple Audio;
21.6 Java Media Framework;
Chapter 22: JavaBeans;
22.1 What’s a Bean?;
22.2 The NetBeans IDE;
22.3 Properties and Customizers;
22.4 Event Hookups and Adapters;
22.5 Binding Properties;
22.6 Building Beans;
22.7 Limitations of Visual Design;
22.8 Serialization Versus Code Generation;
22.9 Customizing with BeanInfo;
22.10 Handcoding with Beans;
22.11 BeanContext and BeanContextServices;
22.12 The Java Activation Framework;
22.13 Enterprise JavaBeans and POJO-Based Enterprise Frameworks;
Chapter 23: Applets;
23.1 The Politics of Browser-Based Applications;
23.2 Applet Support and the Java Plug-in;
23.3 The JApplet Class;
23.4 Java Web Start;
23.5 Conclusion;
Chapter 24: XML;
24.1 The Butler Did It;
24.2 A Bit of Background;
24.3 XML Basics;
24.4 SAX;
24.5 DOM;
24.6 XPath;
24.7 XInclude;
24.8 Validating Documents;
24.9 JAXB Code Binding and Generation;
24.10 Transforming Documents with XSL/XSLT;
24.11 Web Services;
24.12 The End of the Book;
The Eclipse IDE;
The IDE Wars;
Getting Started with Eclipse;
Using Eclipse;
Eclipse Features;
Conclusion;
BeanShell: Java Scripting;
Running BeanShell;
Java Statements and Expressions;
BeanShell Commands;
Scripted Methods and Objects;
Changing the Classpath;
Learning More . . .;
Glossary;
Colophon;

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews

Learning Java 3.3 out of 5 based on 0 ratings. 8 reviews.
Guest More than 1 year ago
There are plenty monumental epic efforts in the field of Java teaching which would start from showing you PDP-11 pictures, and go long distance explaining how hard-drives and memory chips used to look & work when the author was in his prime. Around page number 250, you might encounter a first notion of a JFrame (unless you got completely bored and took off to a nearby coffee shop.) Jokes aside, if you want to learn Java, this book is a 'must have' title. Honest (!) and crystal clear explanations (albeit, yep to some limited degree it would help if you knew C, however C-related experience would help with any Java book.) It is obvious, that authors have tremendous direct programming experience. This book will really help you become knowledgeable Java guru. It is fun to read too. I would strongly recommend it.
Guest More than 1 year ago
[A review of the 3RD EDITION 2005.] If you're learning Java from scratch, you might as well start at the latest version 5.0. But Java has grown hugely since 96. The book's size directly reflects that growth. Even so, the authors had to make the decision to explain only what they consider to be the minimal set of core classes. Their choice seems spot on. Spanning such key topics as I/O, Swing, Applets and Threads. To get best use of the advice, you should be familiar with object oriented programming from another language. The chapters are well written, but can be opaque to one who has never programmed before. Plus, there are no problem sets. This lack can be awkward to some readers. What isn't covered? Advanced functionality like Enterprise Java Beans and JMS. And internationalisation is barely mentioned. Mostly to do with using resource bundles. But no discussion about display issues of bidirectional text, for example. Related to this is just a glancing explanation of Unicode. American readers might say, so what? But readers who might have to code for non-European languages will find the book deficient. Yet, to be fair, the book is long enough as it is. While it is easy to describe what was omitted, the authors have made quite reasonable decisions about coverage.
Guest More than 1 year ago
Starts off on the wrong foot with a multitude of unexplained terms/concepts that 'will be discussed in a later chapter.' One gets the sense that the authors are knowledgeable, but can't quite figure out how to explain the language in a coherent, logical sequence. There's a building, see, and it's a wonderful building. And it has a door that is just a fantastic door. And, oh yeah, there are stairs to get to the door but we'll explain that later. So, anyway, about the windows...
Guest More than 1 year ago
This textbook does a good job of explaining the rules of Java, and all of the examples work in the Net Beans compiler that is provided on the CD that comes with the book. However, when you try to incorporate any of the java applet class examples into an HTML or XHTML file with the recommended element: [APPLET], which, by the way, is deprecated, you receive a 'Loading Java Applet Failed' message in IE, and an 'Applet ExampleApplet notinited' message in Netscape and FireFox. This happened to me when I used the simplest example applet contained in chapter 2. The introductory section of the textbook does not tell you about the business with how the Java interpreter deals with proxy servers -- don't even go there -- you may hose your browser, and maybe your system if you do. You have to go to a separate Sun website to find out how to use the [object] tag, which the W3.org has deemed to be the favored way in which to include class applets for Java. When you have made effort to find out how to use the [object] tag, it is much more complex than the [applet] tag by orders of magnitude, and there is different XHTML coding with the [object] tag for IE versus Netscape!! Is this book worth you money? Maybe it would be if you owned a fully tricked out 3,000 GHz Sun Workstation with 5,000 terrabytes of RAM, and 10,000,000 terrabytes of storage space. The java applets are real memory hogs, and do not load fast at all. My verdict? Save you money and learn more about XML and XHTML JavaScript and CSS -- these technologies have a plug and play receptiveness and they work right out of the box.
Guest More than 1 year ago
Learning Java by Patrick Niemeyer & Jonathan Knudsen is one of the best Java books I¿ve read. Most aspects of Java are covered chapter by chapter in chronological order. This is a good book for beginning programmers trying to learn Java or more experienced programmers learning a second language. Everything you need to write Programs and run your code is included with the book. A complete version of J2SE SDK 1.4 is on the CD in the back of this book. I would certainly recommend Learning Java to beginning as well as intermediate programmers.
Guest More than 1 year ago
Save your money on the other Java books! I have dog-eared Savitch, Eckel and Deitel and none are fit to hold Pat Niemeyer or Jonathan Knudsen's applets. This book describes 'all' of Java's tiny details in a wonderful progression and in a stylish manner. This is a great book.
busterAH More than 1 year ago
my copy was written in Ge,man and I don't know Ger,man BUMMER
Guest More than 1 year ago
After reading previous reviews, I thought this would be a good book for a programmer to learn java. The first chapter of the book is like JAVA propoganda. The second starts giving you programing examples. This is when you learn that JAVA is just C Code that does have an integrated IDE and needs a special runtime to work. Java Script on the other hand is actually useful