Gift Guide

Beginning Java 2


What is this book about?

The Java language has been growing from strength to strength since its inception in 1995. It has since proved to be both powerful and extraordinarily easy to learn and use. This is what makes it ideal for the beginner. With dramatic changes to the handling of files, and the introduction of native support for XML, Java has been updated to work faster and to be current with the incredible rise of XML as a medium for ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (26) from $1.99   
  • New (1) from $50.00   
  • Used (25) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2014

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


What is this book about?

The Java language has been growing from strength to strength since its inception in 1995. It has since proved to be both powerful and extraordinarily easy to learn and use. This is what makes it ideal for the beginner. With dramatic changes to the handling of files, and the introduction of native support for XML, Java has been updated to work faster and to be current with the incredible rise of XML as a medium for communicating data.

This edition of the Beginning Java books outlines everything the beginning programmer needs to know to program with the Java programming language and the 1.4 Java Developer Kit (JDK). With the release of JDK 1.4, programmers can look forward to the most stable edition yet, and even better performance than was available previously.

Over the course of the book, you will build an example application called Sketcher — a simple drawing tool — that teaches you how to build an interactive user interface with Java, how to save and open files, how to use color, and how to respond to user input.

What does this book cover?

  • Teaches the Java language from scratch
  • Object-oriented Programming in Java
  • Handling errors and exceptions in applications
  • Manipulating data and files
  • Concurrent programming and threads
  • A comprehensive introduction to Swing, the graphical user interface API for Java
  • Printing in Java
  • An introduction to XML

Who is this book for?

Ivor's inimitable style has proved to be a hit with nearly half a million people with its easy to learn approach and the many useful examples. Regularly voted the most popular Javaprogramming book, this book teaches Java from scratch and assumes no previous knowledge. It is also suitable for those who have got some programming experience, especially C or C++, which will make learning easier.

Programmers will find this tutorial a quick and easy way to learn Java. Author Ivor Horton provides extensive amounts of information, from language terms to hands-on code demonstrations. Although this book does not include a trial version of the JDK 1.2, it does include step-by-step instructions for all the software tools that accompany it.

Read More Show Less

Product Details

  • ISBN-13: 9781861002235
  • Publisher: Wrox Press, Inc.
  • Publication date: 1/7/1999
  • Series: Programmer to Programmer Ser.
  • Pages: 1110
  • Product dimensions: 7.26 (w) x 9.12 (h) x 1.93 (d)

Meet the Author

Ivor Horton has extensive experience of programming and large-scale systems implementation in a wide range of industrial environments. He has in-depth knowledge and experience of production scheduling and online control systems, computer-aided design and manufacturing systems, as well diverse engineering and scientific applications. He's also taught programming in a variety of languages to engineering and scientific personnel primarily in aerospace and automotive companies. After countless years in the computer industry both doing and managing, Ivor now writes on programming topics for relaxation. When not relaxing, he takes an interest in cosmology, cacti, chaos, and cameras, and does a little editing and criticising of other peoples' efforts on the side.

Read More Show Less

Read an Excerpt

Chapter 1: Introducing Java

This chapter will give you an appreciation of what the Java language is all about. Understanding the details that we'll introduce in this chapter is not important at this stage; you will see all of them again in greater depth in later chapters of the book. The intent of this chapter is to introduce you to the general ideas that underpin what we'll be covering through the rest of the book, as well as the contexts in which Java programs can be used and the kind of program that is applicable in each context.

In this chapter you will learn:

What is Java All About?

Java is an innovative programming language that first of all enables you to write programs called applets that you can embed in Internet Web pages. Java also allows you to write applications programs that you can run normally on your, or indeed any, computer that supports the language. You can even write programs that will work as an ordinary application and as an applet. Because Java has matured so much recently, it is becoming the language of choice for applications that need to run on a variety of different computer systems.

Being able to embed executable code in a Web page introduces a vast range of exciting possibilities. Instead of being a passive presentation of text and graphics, a Web page can be interactive in any way that you want. You can include animations, games, interactive transaction processing - the possibilities are unlimited.

Beginning Java 2

Of course, embedding program code in a Web page creates special security requirements. As an Internet user accessing a page with embedded Java code, you need to be confident that it will not do anything that might interfere with the operation of your computer, or damage the data you have on your system. This implies that execution of the embedded code must be controlled in such a way that it will prevent accidental damage to your computer environment, as well as ensure that creating code with malicious intent is effectively inhibited. Java implicitly incorporates measures to minimize the possibility of such occurrences.

Aside from its ability to create programs that can be embedded in a Web page, perhaps the most important characteristic of Java is that it was designed from the outset to be machine independent. Java programs will run unchanged on an); computer that supports Java. Of course there is still the slim possibility of the odd glitch as you are ultimately dependent on the implementation of Java on any particular machine, but Java programs are intrinsically more portable than programs written in other languages. An interactive application written in Java will only require a single set of source code, regardless of the number of different computer platforms on which it is run. In any other programming language the application will require the source code to be tailored to each individual computer to accommodate the particular idiosyncrasies of that machine and operating system.

Possibly the next most important characteristic of Java is that it is object oriented. The objectoriented approach to programming is also an implicit feature of all Java programs, so we will be looking at what this implies later in this chapter. Not only is Java object oriented, but it manages to avoid many of the difficulties and complications that are inherent in some other object-oriented languages, so you will find it very straightforward and easy to learn.

Learning Java

Java is not difficult, but there is a great deal to it. The language itself is quite compact, but very powerful. To be able to program effectively in Java, however, you also need to understand the libraries that go with the language, and these are very extensive. In this book, the sequence in which you learn how the language works, and how you apply it, has been carefully structured so that you can gain expertise and confidence with programming in Java through a relatively easy and painless process. Each chapter, as far as possible, avoids the use of things you haven't learnt about already. A consequence, though, is that you won't be writing Java to be embedded in Web pages right away. While it may be an appealing idea, this would be a bit like learning to swim by jumping in the pool at the deep end. Generally speaking, there is good evidence that by starting in the shallow end of the pool and learning how to float before you try to swim, the chance of you drowning is minimized, and there is a high expectation that you will end up a competent swimmer.

Java Programs

As we have already noted, there are two kinds of programs you can write in Java. Programs that are to be embedded in a Web page are called Java applets, and ordinary standalone programs are called Java applications. You can further subdivide Java applications into console applications, which only support character output to your computer screen (in a DOS window on a PC under Windows, for example) and windowed Java applications that can create and manage multiple windows, and use the typical graphical user interaction (GUI) mechanisms of window-based programs.

While you are learning the Java language basics, we will be using console applications as examples to illustrate how things work. This is because we can then focus on the specifics of the language, without worrying about any of the complexity involved in creating and managing windows. Once you are comfortable with using all the features of the Java language, we'll move on to windowed applications and applet examples.

Learning Java - the Road Ahead

Before starting out, it is always helpful to have an idea of where you are heading and what route you should take, so let's take a look at a brief road map of where you will be going with Java. There are five broad stages you will progress through in learning Java using this book:

1. The first stage is this chapter. It sets out some fundamental ideas about the structure of Java programs and how they work. This includes such things as what objectoriented programming is all about, and how an executable program is created from a Java source file. Getting these concepts straight at the outset will make learning to write Java programs that much easier for you.

2. Next you will learn how statements are put together, what facilities you have for storing basic data in a program, how you perform calculations and how you make decisions based on the results of them. These are the nuts and bolts you need for the next stages.

3. In the third stage you will learn about classes - how you define them and how you can use them. This is where you learn the object-oriented characteristics of the language. By the time you are through this stage you will have learnt all the basics of how the Java language works so you will be ready to progress further into how you can use it.

4. In the fourth stage, you will learn how you can segment your application into pieces that can execute concurrently. This is particularly important for when you want to include several applets in a Web page, and you don't want one applet to have to wait for another to finish executing, before it can start. You may want a fancy animation to continue running while you play a game, for example, with both programs sitting in the same Web page.

5. In the fifth stage you will learn in detail how you implement an application or an applet with a graphical user interface, and how you handle interactions with the user in this context. This amounts to applying the capabilities provided by the Java class libraries. As well as learning about GUI implementation, you will also learn about handling images in various ways, as well as using the database access facilities in Java. When you finish this stage you will be equipped to write your own fully-fledged applications and applets in Java. At the end of the book, you should be a knowledgeable Java programmer. The rest is down to experience....

Read More Show Less

Table of Contents

Introduction 1
Chapter 1 Introducing Java 7
Chapter 2 Programs, Data, Variables and Calculation 33
Chapter 3 Loops and Logic 73
Chapter 4 Arrays and Strings 115
Chapter 5 Defining Classes 163
Chapter 6 Extending Classes and Inheritance 229
Chapter 7 Exceptions 285
Chapter 8 Streams, Files and Stream Output 319
Chapter 9 Stream Input, and Object Streams 367
Chapter 10 Utility Classes 409
Chapter 11 Threads 479
Chapter 12 Creating Windows 525
Chapter 13 Handling Events 599
Chapter 14 Drawing in a Window 657
Chapter 15 Extending the GUI 723
Chapter 16 Filing and Printing Documents 799
Chapter 17 Images and Animation 849
Chapter 18 Talking to Databases 901
Chapter 19 The JDBC in Action 959
Appendix A Setting Up 1029
Appendix B Java Archives - JAR files 1035
Appendix C Keywords 1043
Appendix D ASCII Codes 1045
Appendix E Computer Arithmetic 1051
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 8 Customer Reviews
  • Anonymous

    Posted March 6, 2003

    A Great Book for Java Beginners

    I wanted to learn Java, and I bought this book. It is great. I am a Microsoft Certified Professional with Visual Basic 6.0, so I am not new to programming. This is an awesome book, and I will definetely keep it for a reference. I couldn't ask for a better beginner book for Java.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted October 17, 2001

    Very Useful Beginner Guide To Java

    Great writter and a great book. In depth explanation of all the foundation classes in java and their varied uses.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 11, 2001

    Good value for your money

    A serious programming (Java) approach for beginners. However, most of the examples used are either unrealistic or just plain petty. Hence, you still don't get to appreciate the power of this language.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 26, 2000

    Great book for learning Java!

    I have been programming with Visual Basic for 5 years and I did not know any Java at all. I have found that although it seems to be a slow starting book it gives you an excellent foundation and builds on what you have learned in each chapter. If you want to learn Java by yourself then I really recommend this book, I have to learn Java for my job and so far this has been the best learning aid I have found. The explanations are clear and the examples are great and add to your understanding of the language.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 23, 2000

    The book of all books

    This book is great for beginners who really want to learn Java 2. It's very clear and it has great examples. This book is a bit wordy, but its all worth it. Ivor Horton is a great author and I strongly suggest you buy this book. I've read many Java books, and this book is surely the Java 2 Bible.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted March 14, 2000


    I have read several Java books. This one is by far the best. This book covers more material, more clearly then any other book that I have seen. I have read other Ivor Horton books, including the Beginning C++ and Beginnig Visual C++ books. All of them are exceptional and would recommend them to anyone. These books are very good for people who really want to learn a programming language and not just a few flashy things to put on a web page.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted February 11, 2000

    (New to Java and Computers)

    I just started working with Java AND computers. I'm finding the book extremely useful, not only with the language, but also with the download,install, and placement of files in the JDK. It's very thorough, which may be boring for an experienced programmer, but is great for an unseasoned beginner like myself.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 25, 1999

    Good for Beginners with no experience in programming

    This Book teaches you step-by-step how to program in JAVA. If you have experience in C,C++ or VB you may find this book boring. I did. I would recomend another book if you have experience in programming.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 8 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)