
Java 2 Programmer's Interactive Workbook
by Kevin Chu, Eric Brower1663H-9
The perfect hands-on Java course for absolute beginners: all the skills you need to get results, fast! Get Java up and running, start editing files, use the Java console, run Java applications and applets. Learn the basics of object-oriented programming through easy examples, analogies, and exercises. Then, master Java data types, control
Overview
1663H-9
The perfect hands-on Java course for absolute beginners: all the skills you need to get results, fast! Get Java up and running, start editing files, use the Java console, run Java applications and applets. Learn the basics of object-oriented programming through easy examples, analogies, and exercises. Then, master Java data types, control structures, basic Java graphical user interfaces, events, classes, inheritance, exceptions, error handling-even multimedia!
Totally integrated with a FREE, state-of-the-art Java learning Web site!
Every Prentice Hall Interactive Workbook is fully integrated with its own exclusive Web site, giving you all this and more:
- "Test Your Thinking" project solutions and detailed explanations
- Author's Corner: Your personal connection to this book's expert author
- Additional self-review exercises with instant feedback and explanations
- An exclusive message board where you can interact with other students!
Just the facts! No endless, boring discussions here! You'll learn hands-on, through practical exercises, self-review questions, and real-world answers. Exclusive "Test Your Thinking" projects guarantee you'll go beyond rote knowledge to really master the subject! It's an integrated learning system that's proven to work!
Dozens of exercises cover the real world tasks that matter most!
100s of self-review questions and answers make sure you understand!
Editorial Reviews
Product Details
- ISBN-13:
- 9780130166388
- Publisher:
- Prentice Hall
- Publication date:
- 12/20/1999
- Series:
- Interactive Workbook Series
- Pages:
- 502
- Product dimensions:
- 7.00(w) x 9.10(h) x 1.20(d)
Read an Excerpt
Introduction
Welcome to the Java 2 Programmer's Interactive Workbook. This book will help guide you as you learn the Java programming language, which is regarded as the future of computer programming. Never before has a computer language so successfully combined a powerful object-oriented language with all of the graphical tools needed to create a fully functional program that can run on any system and in any Web browser. With the advance of the Internet, Java has become the language of choice for developers who need to create and distribute their applications quickly.
Java was developed by Sun Microsystems in the early 1990s and has been gaining popularity every since. Prior to Java, the two main languages used by the computer industry were C, and C++. C is simple, powerful, and sometimes elegant, but it is also a procedural language. C++ is object-oriented, but also hugely complex and requires a great deal of overhead to maintain a program. Both languages are also machine-dependent, meaning that their programs only run on one type of computer (PC, Mac, Unix). The program must be recompiled, and sometimes rewritten, to work on a different computer. This can lead to long development times for projects.
Likewise, neither C nor C++ have built-in graphical utilities. Both must use special libraries that allow the program to use the windowing features of the computer. These libraries can be vastly different on various computer platforms, requiring more rewriting of the programs.
Java provides programmers the power and flexibility of C, while at the same time, allowing them to build true object-oriented programs without the overhead of C++. Additionally, the graphics utilities are built-in to Java, so no writing is ever needed. With Java 2, the "look and feel" of the program can be changed to match the local windowing system without any rewriting or recompiling. This means the same program can look like a Mac program when running on a Mac, and also look like a Windows program when running on a PC. All of this is possible after just writing and compiling the program just one time.
One additional feature of Java is that all of the objects created in Java
are truly reusable. This means that every program can build on past programs, greatly reducing the time it takes to develop programs. No longer do programmers have to keep reinventing the wheel with every new project.
Who This Book Is For
This book is for the beginning programmer. It teaches computer programming using Java as the first language. Almost every other Java book out there assumes that you've programmed in some other language before (usually C). This book does not make that assumption. If you have never programmed before, then this book is for you. If you have programmed in an "older" language, such as Fortran, Pascal or Cobol, then this book is also for you. If you have programmed extensively in C or C++, then this book is probably not for youit may be too basic for you.
In addition to covering the basics of the Java programming language, this book will also cover topics that apply to any programming language. Such topics include general programming terms, Boolean logic, and basic program design. There are many books that show you how to do something in Java, but the authors feel that it's just as important to know why and when to do it.
This book is also not intended to be the end-all of Java books. Far from it! However, the unique format of the Interactive Workbook series makes this book an excellent tool to get you started down the path of learning Java. You won't be a Java expert when you're done with this book, but you will have a solid foundation on which to become an expert. The authors recommend that you follow-up this book with at least two other books on Java (you know, the ones that assume you already know the language!). One book should be a general Java reference book, and the other should be a Swing book. You'll learn about Swing is this book, but for now, know that Swing is the toolkit used to create graphical user interfaces (GUIs). There are many such books out there today, and most of them are very good, but as reference books. This book is meant to fill that gap between knowing nothing, and being able to use the reference books.
How This Book Is Organized
The Interactive Workbook series offers a unique and challenging program to "learn by doing." Only by engaging your brain in exercises can you truly learn anything. The creators of the Interactive Workbook series understand this concept, so these books offer more than just reading.
Chapters, Labs, and Exercises, oh my!
Every chapter is divided into several labs. Each lab targets a specific topic. You should try and complete a lab in a single sitting, so allow yourself some time. As you begin each lab, you will be given some instruction followed by the exercises. Make sure you do the exercises! The exercises are the key to learning. The authors also provide answers to the exercises, as well as follow-up discussion.
It is crucial that you actually do the exercises and then read the answers. It is also crucial that you read the discussion that follows. Unlike most books, the "chapter" is not over when the labs begin. The labs are not just a regurgitation of the chapter instruction. The exercises in the lab will reinforce the instruction in the chapter, but they will then challenge you to build on that knowledge. The answers to the exercises may contain new information not presented in the chapter instruction. This new information will make much more sense to you if you have done the exercises first.
Self-Review Questions
At the end of each chapter are a series of Self-Review Questions. These questions also help to reinforce that you have learned what you needed to learn from the chapter. The answers to these questions can be found in Appendix A of this book.
Test Your Thinking
The end of each chapter also has a Test Your Thinking section. This section contains more advanced projects than those contained in the labs. If you can handle these exercises, then you have really started to master the subject! The answers for the Test Your Thinking projects are not in the book, but they can be found on the Web page for this book.
Web Companion
As with all of the books in the Interactive Workbook series, this book has a companion Web site, which is located at the following site:
http://www.phptr.com/chu
This companion Web site is closely integrated with the content of this book, and we encourage you to visit it early and often. At the Web site, you will find all of the source code used in this book, answers to the Test Your Thinking exercises, the Self-Review questions and answers, and more! You can also send e-mail to the authors because they just don't get enough!
What You Will Need
In order to program in Java, and use this book, you will need a few things.
A Computer
This may seem obvious, but you will need one. Java, being a platform-independent language, will run on most current computers. Java is supported on the following systems:
- Window 95, 98, or NT or better
- MacOS 8.1 or better
- Solaris 2.5.1 or better
For the other flavors of Unix, including Linux, you'll need to check the Web page that follows.
The Java 2 Software Developers Kit (SDK)
For this book, you will need to obtain the Production Release of the Java 2 SDK Standard Edition. This is also known as the JDK 1.2. At press time, this was actually known as JDK 1.2.2. There may be a more recent release by the time the book goes to print.
The Solaris and Windows version of Java 2 are free from Sun Microsystems at the following URL:
http://java.sun.com/java2
At this URL you will find both the Java 2 software and the documentation. We recommend that you get both. You may not be able to understand the documentation at first, but . . .
Sun may require that you register yourself for the download, but the software is free.
At press time, the actual download URL is the following:
http://java.sun.com/products/jdk/1.2
From this location you can download the Windows or Solaris releases of Java. If you have a Mac, or different flavor of Unix, click on the Platform Ports link to direct you to the version you need.
In Chapter 1, we will cover the download process and make sure that you can compile and run a Java program. Then in Chapter 2, we'll start learning some Java!
Meet the Author
Kevin Chu is a senior Java programmer at Sun Microsystems. He holds a patent (pending) on software design using techniques made possible by Java.
Customer Reviews
Average Review: