Home

This Chapter
-Introduction
-Java, the Language and the Technology
-An Overview of Object-Oriented Programming
-New Features in Java 5
-About This Book
-Downloading and Installing Java 5
-Downloading Program Examples and Answers

Table of Contents
-Introduction
-Chapter 1: Your First Taste of Java
-Chapter 2: Language Fundamentals
-Chapter 3: Statements
-Chapter 4: Objects and Classes
-Chapter 5: Core Classes
-Chapter 6: Inheritance
-Chapter 7: Error Handling
-Chapter 8: Numbers and Dates
-Chapter 9: Interfaces and Abstract Classes
-Chapter 10: Enums
-Chapter 11: The Collections Framework
-Chapter 12: Generics
-Chapter 13: Input Output
-Chapter 14: Nested and Inner Classes
-Chapter 15: Swing Basics
-Chapter 16: Swinging Higher
-Chapter 17: Polymorphism
-Chapter 18: Annotations
-Chapter 19: Internationalization
-Chapter 20: Applets
-Chapter 21: Java Networking
-Chapter 22: Java Database Connectivity
-Chapter 23: Java Threads
-Chapter 24: Security
-Chapter 25: Java Web Applications
-Chapter 26: JavaServer Pages
-Chapter 27: Javadoc
-Chapter 28: Application Deployment
-Appendix A: javac
-Appendix B: java
-Appendix C: jar
-Appendix D: NetBeans
-Appendix E: Eclipse

Next

 

Introduction

Welcome to Java 5: A Beginner’s Tutorial. Java is a mature programming language that is easy to learn. At the same time it is also a vast collection of technologies that are so diverse that beginners often don’t know where to start. If you are one of them, then this book is for you because it has been designed as a tutorial for novices.

As a beginner’s tutorial, this book does not teach you every Java technology there is. (It is impossible to cram everything into a single volume anyway, and that’s why most Java titles are focused on one technology.) Rather, this book covers the most important Java programming topics that you need to master to be able to learn other technologies yourself. Nonetheless this book is comprehensive that by fully understanding all the chapters and doing the exercises you’ll be able to perform an intermediate Java programmer’s daily tasks quite well. This book offers all the three subjects that a professional Java programmer must be proficient in:

What makes structuring an effective Java course difficult is the fact that the three subjects mentioned above are interdependent. On the one hand, Java is an OOP language, so its syntax is easier to learn if you already know about OOP. On the other hand, OOP features such as inheritance, polymorphism, and data encapsulation, are best taught if accompanied by real-world examples. Unfortunately, understanding real-world Java programs requires knowledge of the Java core libraries. Because of such interdependence, the three main topics are not grouped into three isolated parts. Instead, chapters discussing a major topic and chapters teaching another are interwoven. For example, before explaining polymorphism, this book makes sure that you are familiar with certain Java classes so that real-world examples can be given. In addition, because a language feature such as generics cannot be explained effectively without the comprehension of a certain set of classes, it is covered after the discussion of the supporting classes.

There are also situations whereby a topic can be found in two or more places. For instance, the for statement is a basic language feature that should be discussed in an early chapter. However, for can also be used to iterate over a collection of objects, a feature that should only be given after the Collections Framework is taught. Therefore, for is first presented in Chapter 3, "Statements" and then revisited in Chapter 11, "The Collections Framework." The rest of this introduction presents a high-level overview of Java, an introduction to OOP, a brief description of each chapter, and instructions for installing the Java software.

Next