Suitable for the classroom or for self-study, Java Programming from the Beginning
puts basic Java development and object-oriented design into the hands of any computer-literate reader. Assuming no knowledge of computers--except, of course, an aptitude for programming and a willingness to learn--this textbook is one of the more accessible and well-presented introductions to Java available today.
The author is an experienced college teacher, and the book's effective presentation style is arguably its major strength. Early chapters rely on simple mathematical examples (such as converting temperatures from Fahrenheit to Celsius, or averaging grades). Other examples look at parsing social security numbers or storing entries from a telephone book. Java Programming does a good job of presenting the basics of object-oriented design in terms of both designing custom classes and taking advantage of existing Java classes, such as String, StringBuffer, and Vector objects. Of course, along the way, the basics of Java syntax are covered, including many of its keywords, operators, and data types.
Although it's suitable for a college classroom, this textbook is never academic or dull. The colloquial and friendly writing style presents the essentials of Java without ever getting bogged down in theory. Besides command-line programs, you'll learn also how to do basic graphics in Java, and even play simple games (like blackjack). The custom classes that are presented in this book make it simpler to work with Java, even for beginners. Every chapter provides extensive review summaries of the important points that are demonstrated in each section, as well as a handful of exercises that'll let you try out material on your own.
Now that Java is used routinely as a first programming language in many colleges, Java Programming from the Beginning fills a useful niche. It's also an excellent home-study choice for the reader who appreciates a patient and thorough teaching style. --Richard Dragan
- Basics of computer hardware and software
- Graphical user interfaces vs. text-based interfaces
- General introduction to programming languages
- Basic Java language features and syntax
- Console I/O
- Computing averages
- Syntax errors and debugging
- Introduction to object-oriented design: classes, objects, and instance methods
- Working with the Java String and StringBuffer classes
- Basic control structures
- Relational and equality operators
- Operator precedence
- Loops and counting variables
- Decoding social security numbers
- Using Java arrays and the Vector class
- Using arrays for a database
- Arrays of objects
- Sample case study for a telephone directory
- Drawing basic shapes, colors, and text
- A message window example
- Class variables and methods
- Passing arguments to methods
- Helper methods
- Principles for designing methods in Java
- Exception-handling basics
- The switch statement
- Using the Java primitive types
- Writing custom classes
- The this keyword
- Code reuse
- Sample code for blackjack
- Inheritance and subclasses
- Abstract classes
- The final classes
- Introduction to the Abstract Windowing Toolkit (AWT)
- Frames and event handlers
- Layout managers
- Data structures, sorting, and searching
- Using sets (and bit sets)
- File I/O in Java (opening, reading, and writing files)
- Installing the Sun JDK
- Custom classes for simplified introductory Java programming
From the Author
Since 1996, I've taught Java to hundreds of college students and working professionals. I've found that nearly all Java books on the market are too difficult for someone with no previous programming experience. "Java Programming: From the Beginning" is designed to fill that gap.
If you're searching for a book that covers all the trendy new Java features, you'll need to look elsewhere. If you want a book that's broad but shallow, you've come to the wrong place. But if you're interested in learning the fundamentals of Java and of programming in general, welcome home.
I've tried to explain Java in clear, simple language, using plenty of interesting programs to illustrate the features of the language. I've avoided using a "cookbook" approach: the emphasis is on understanding, not merely imitating.
Although "Java Programming: From the Beginning" is for the novice, it isn't one of those watered-down "dummies" books. It assumes that the reader is an intelligent person who simply lacks programming experience. If "gentle but thorough" didn't sound so much like a laxative slogan, it would be the perfect description for this book. Starting from the beginning, it covers all the fundamental knowledge that a Java programmer needs.
Each chapter of "Java Programming: From the Beginning" ends with a Q&A section--a series of questions and answers related to material covered in the chapter. Other key features include:
* Style tips
* Design tips
* Debugging sections
* Case studies
* Nearly 400 review questions (with answers provided) and 200 exercises
* Over 130 programming projects
For more information about "Java Programming: From the Beginning," please visit the author's Web site (knking.com).