did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780764588747

Beginning Programming with Java™ For Dummies©, 2nd Edition

by
  • ISBN13:

    9780764588747

  • ISBN10:

    0764588745

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2005-04-01
  • Publisher: For Dummies
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $24.99

Summary

Covering everything from basic Java development concepts to the latest tools and techniques used in Java, this book will put would-be programmers on their way to Java mastery Explores what goes into creating a program, how to put the pieces together, dealing with standard programming challenges, debugging, and making it work Updated for the release of the Java SDK 2.0, with all examples revised to reflect the changes in the technology

Author Biography

Barry Burd has been a professor of computer science and has trained programmers for business and industry. His other books include Java & XML For Dummies and Eclipse For Dummies.

Table of Contents

Introduction 1(1)
How to Use This Book
1(1)
Conventions Used in This Book
2(1)
What You Don't Have to Read
2(1)
Foolish Assumptions
3(1)
How This Book Is Organized
4(1)
Part I: Revving Up
4(1)
Part II: Writing Your Own Java Programs
4(1)
Part III: Controlling the Flow
5(1)
Part IV: Using Program Units
5(1)
Part V: The Part of Tens
5(1)
Icons Used in This Book
5(1)
Where to Go from Here
6(1)
Part I: Revving Up
7(38)
Getting Started
9(14)
What's It All About?
9(3)
Telling a computer what to do
10(1)
Pick your poison
11(1)
From Your Mind to the Computer's Processor
12(7)
Translating your code
12(1)
Running code
13(4)
Code you can use
17(2)
Your Java Programming Toolset
19(4)
What's already on your hard drive?
20(1)
JCreator
21(2)
Setting Up Your Computer
23(10)
Downloading and Installing the Software You Need
24(5)
Downloading and Installing a Java compiler
24(2)
Downloading and installing the Java API documentation
26(2)
Downloading and installing the JCreator integrated development environment
28(1)
Running JCreator for the First Time
29(2)
Is That All There Is to It?
31(2)
Running Programs
33(12)
Running a Canned Java Program
33(5)
Typing and Running Your Own Code
38(7)
Part II: Writing Your Own Java Programs
45(94)
Exploring the Parts of a Program
47(18)
Checking Out Java Code for the First Time
47(2)
Behold! A program!
48(1)
What the program's lines say
49(1)
The Elements in a Java Program
49(8)
Keywords
50(2)
Identifiers that you or I can define
52(1)
Identifiers with agreed upon meanings
52(1)
Literals
53(1)
Punctuation
54(2)
Comments
56(1)
Understanding a Simple Java Program
57(8)
What is a method?
57(3)
The main method in a program
60(1)
How you finally tell the computer to do something
61(2)
The Java class
63(2)
Composing a Program
65(24)
A Program to Echo Keyboard Input
66(8)
Typing and running a program
68(2)
How the EchoLine program works
70(2)
Getting numbers, words, and other things
72(2)
Type two lines of code, and don't look back
74(1)
Expecting the Unexpected
74(15)
Diagnosing a problem
76(10)
What problem? I don't see a problem
86(3)
Using the Building Blocks: Variables, Values, and Types
89(14)
Using Variables
89(5)
Using a variable
90(2)
Understanding assignment statements
92(1)
To wrap or not to wrap?
93(1)
What Do All Those Zeros and Ones Mean?
94(2)
Types and declarations
95(1)
What's the point?
96(1)
Reading Decimal Numbers from the Keyboard
96(3)
Though these be methods, yet there is madness in 't
97(2)
Methods and assignments
99(1)
Variations on a Theme
99(4)
Moving variables from place to place
100(1)
Combining variable declarations
101(2)
Numbers and Types
103(18)
Using Whole Numbers
103(5)
Reading whole numbers from the keyboard
105(1)
What you read is what you get
106(2)
Creating New Values by Applying Operators
108(10)
Finding a remainder
108(3)
The increment and decrement operators
111(6)
Assignment operators
117(1)
Size Matters
118(3)
Numbers? Who Needs Numbers?
121(18)
Characters
122(9)
I digress
123(2)
One character only, please
125(1)
Variables and recycling
125(2)
When not to reuse a variable
127(2)
Reading characters
129(2)
The boolean Type
131(7)
Expressions and conditions
132(1)
Comparing numbers; comparing characters
133(5)
The Remaining Primitive Types
138(1)
Part III: Controlling the Flow
139(130)
Forks in the Road
141(16)
Making Decisions (Java if Statements)
143(7)
Looking carefully at if statements
143(4)
A complete program
147(3)
Indenting if statements in your code
150(1)
Variations on the Theme
150(7)
. . . Or else what?
151(2)
Packing more stuff into an if statement
153(2)
Some handy import declarations
155(2)
Which Way Did He Go?
157(24)
Forming Bigger and Better Conditions
157(13)
Combining conditions: An example
159(2)
When to initialize?
161(1)
More and more conditions
162(3)
Using boolean variables
165(1)
Mixing different logical operators together
166(2)
Using parentheses
168(2)
Building a Nest
170(5)
Nested if statements
171(1)
Cascading if statements
172(3)
Enumerating the Possibilities
175(6)
Creating an enum type
176(1)
Using an enum type
176(3)
Creating a project with two Java source files
179(2)
How to Flick a Virtual Switch
181(14)
Meet the switch Statement
181(9)
The cases in a switch statement
183(1)
The default in a switch statement
184(1)
Picky details about the switch statement
185(3)
To break or not to break
188(2)
Using Fall-through to Your Advantage
190(2)
Using a Conditional Operator
192(3)
Around and Around It Goes
195(20)
Repeating Instructions Over and Over Again (Java while Statements)
196(4)
Following the action in a loop
197(2)
No early bailout
199(1)
Thinking about Loops (What Statements Go Where)
200(7)
Finding some pieces
200(3)
Assembling the pieces
203(1)
Getting values for variables
203(2)
From infinity to affinity
205(2)
Thinking About Loops (Priming)
207(8)
Working on the problem
209(3)
Fixing the problem
212(3)
Piles of Files: Dealing with Information Overload
215(18)
Running a Disk-Oriented Program
216(10)
A sample program
217(2)
Creating code that messes with your hard drive
219(3)
Running the sample program
222(2)
Troubleshooting problems with disk files
224(2)
Writing a Disk-Oriented Program
226(4)
Reading from a file
227(1)
Writing to a file
227(3)
Writing, Rewriting, and Re-rewriting
230(3)
Creating Loops within Loops
233(12)
Paying Your Old Code a Little Visit
234(2)
Reworking some existing code
235(1)
Running your code
236(1)
Creating Useful Code
236(9)
Checking for the end of a file
237(2)
How it feels to be a computer
239(2)
Why the computer accidentally pushes past the end of the file
241(2)
Solving the problem
243(2)
The Old Runaround
245(24)
Repeating Statements a Certain Number Times (Java for Statements)
246(6)
The anatomy of a for statement
248(2)
Initializing a for loop
250(2)
Using Nested for Loops
252(2)
Repeating Until You Get What You Need (Java do Statements)
254(6)
Getting a trustworthy response
255(2)
Deleting files
257(1)
Using Java's do statement
258(1)
A closer look at the do statement
259(1)
Repeating with Predetermined Values (Java's Enhanced for Statement)
260(9)
Creating an enhanced for loop
261(2)
Nesting the enhanced for loops
263(6)
Part IV: Using Program Units
269(90)
Using Loops and Arrays
271(18)
Some for Loops in Action
271(6)
Deciding on a loop's limit at runtime
274(1)
Using all kinds of conditions in a for loop
275(2)
Reader, Meet Arrays; Arrays, Meet the Reader
277(6)
Storing values in an array
280(2)
Creating a report
282(1)
Working with Arrays
283(6)
Programming with Objects and Classes
289(14)
Creating a Class
290(4)
Reference types and Java classes
291(1)
Using a newly defined class
291(2)
Running code that straddles two separate files
293(1)
Why bother?
294(1)
From Classes Come Objects
294(6)
Understanding (or ignoring) the subtleties
297(1)
Making reference to an object's parts
297(1)
Creating several objects
298(2)
Another Way to Think About Classes
300(3)
Classes, objects, and tables
301(1)
Some questions and answers
302(1)
Using Methods and Variables from a Java Class
303(22)
The String Class
303(4)
A simple example
304(1)
Putting String variables to good use
305(1)
Reading and writing strings
306(1)
Using an Object's Methods
307(6)
Comparing strings
310(1)
The truth about classes and methods
311(1)
Calling an object's methods
312(1)
Combining and using data
313(1)
Static Methods
313(5)
Calling static and non-static methods
314(1)
Turning strings into numbers
315(1)
Turning numbers into strings
316(2)
How the NumberFormat works
318(1)
Understanding the Big Picture
318(7)
Packages and import declarations
319(1)
Shedding light on the static darkness
320(1)
Barry makes good on an age-old promise
321(4)
Creating New Java Methods
325(22)
Defining a Method within a Class
325(9)
Making a method
326(2)
Examining the method's header
328(1)
Examining the method's body
328(2)
Calling the method
330(2)
The flow of control
332(1)
Using punctuation
333(1)
The versatile plus sign
333(1)
Let the Objects Do the Work
334(2)
Passing Values to Methods
336(5)
Handing off a value
338(2)
Working with a method header
340(1)
How the method uses the object's values
340(1)
Getting a Value from a Method
341(6)
An example
342(2)
How return types and return values work
344(1)
Working with the method header (again)
345(2)
Oooey GUI Was a Worm
347(12)
The Java Swing Classes
348(4)
Showing an image on the screen
348(2)
Just another class
350(2)
Keeping the User Busy (Working with Buttons and Text Fields)
352(3)
Taking Action
355(4)
Part V: The Part of Tens
359(12)
Ten Sets of Web Links
361(6)
The Horse's Mouth
361(1)
Finding News, Reviews, and Sample Code
362(1)
Improving Your Code with Tutorials
362(1)
Finding Help on Newsgroups
362(1)
Reading Documentation with Additional Commentary
363(1)
Checking the FAQs for Useful Info
363(1)
Opinions and Advocacy
363(1)
Looking for Java Jobs
364(1)
Finding Out More about Other Programming Languages
364(1)
Everyone's Favorite Sites
365(2)
Ten Useful Classes in the Java API
367(4)
Applet
367(1)
ArrayList
368(1)
File
368(1)
Integer
368(1)
Math
369(1)
NumberFormat
369(1)
Scanner
369(1)
String
369(1)
StringTokenizer
370(1)
System
370(1)
Index 371

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program