BN.com Gift Guide

Java For Dummies

( 5 )

Overview

Even if you're new to Java programming - or to programming in general - you can get up and running on this wildly popular language in a hurry. This book makes it easy! From how to install and run Java to understanding classes and objects and juggling values with arrays and collections, you will get up to speed on the new features of Java 6 in no time. Discover how to: Use object-oriented programming, Work with the changes in Java 6 and JDK[Trademark] 6, Save time by reusing code, Mix Java and Javascript with the ...
See more details below
Paperback (Revised Edition)
$18.69
BN.com price
(Save 37%)$29.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (26) from $1.99   
  • New (1) from $0.00   
  • Used (25) from $1.99   

Overview

Even if you're new to Java programming - or to programming in general - you can get up and running on this wildly popular language in a hurry. This book makes it easy! From how to install and run Java to understanding classes and objects and juggling values with arrays and collections, you will get up to speed on the new features of Java 6 in no time. Discover how to: Use object-oriented programming, Work with the changes in Java 6 and JDK[Trademark] 6, Save time by reusing code, Mix Java and Javascript with the new scripting tools, Troubleshoot code problems and fix bugs.

About the Author:
Barry Burd is a computer science professor at Drew University and a Java trainer

Read More Show Less

Product Details

  • ISBN-13: 9780470087169
  • Publisher: Wiley
  • Publication date: 12/11/2006
  • Series: For Dummies Series
  • Edition description: Revised Edition
  • Edition number: 4
  • Pages: 384
  • Sales rank: 623,091
  • Product dimensions: 7.40 (w) x 9.30 (h) x 0.80 (d)

Meet the Author

Barry Burd, PhD, is a Computer Science professor at Drew University where he has been named to Drew's "List of Teachers Ranked as Excellent by Students" five times. Barry is the author of numerous For Dummies books and writes frequently for several online publications, including JavaBoutique.com.

Read More Show Less

Table of Contents


Introduction     1
How to Use This Book     1
Conventions Used in This Book     2
What You Don't Have to Read     2
Foolish Assumptions     3
How This Book Is Organized     4
Getting Started     4
Writing Your Own Java Programs     4
Working with the Big Picture: Object-Oriented Programming     4
Savvy Java Techniques     5
The Part of Tens     5
Appendices     5
Bonus Chapters on the CD-ROM!     5
Icons Used in This Book     6
Where to Go from Here     7
Getting Started     9
All about Java     11
What You Can Do with Java     12
Why You Should Use Java     13
Getting Perspective: Where Java Fits In     14
Object-Oriented Programming (OOP)     15
Object-oriented languages     16
Objects and their classes     16
What's so good about an object-oriented language?     18
Refining your understanding of classes and objects     20
What's Next?     22
Running Canned Java Programs     23
Downloading and Installing the Java Development Kit (JDK)     23
Downloading Java     25
Installing Java on your computer     27
Preparing to Use an Integrated Development Environment     30
JCreator     31
Running JCreator for the first time     31
Running Java Programs     33
Running a text-based program     34
Running a GUI on its own     38
Running a GUI on a Web page (a Java applet)     41
Using the Basic Building Blocks     45
Speaking the Java Language     45
The grammar and the common names     46
The words in a Java program     47
Checking Out Java Code for the First Time     49
Understanding a Simple Java Program     50
The Java class     51
The Java method     52
The main method in a program     53
How you finally tell the computer to do something     54
Curly braces     57
And Now, a Few Comments     59
Adding comments to your code     60
What's Barry's excuse?     63
Finding javadoc pages     63
Using comments to experiment with your code     64
Typing Your Own Code     65
Writing Your Own Java Programs     71
Making the Most of Variables and Their Values     73
Varying a Variable     73
Assignment Statements     75
Understanding the Types of Values That Variables May Have     76
An Import Declaration     79
Displaying Text     80
Numbers without Decimal Points     80
Combining Declarations and Initializing Variables     82
The Atoms: Java's Primitive Types     83
The char type     84
The boolean type     86
The Molecules and Compounds: Reference Types     88
Creating New Values by Applying Operators     92
Initialize once, assign often     94
The increment and decrement operators     95
Assignment operators     99
Controlling Program Flow with Decision-Making Statements     101
Making Decisions (Java if Statements)     102
Guess the number     102
She controlled keystrokes from the keyboard     103
Creating randomness     104
The if statement     105
The double equal sign     106
Brace yourself     107
Indenting if statements in your code     107
Elseless in Ifrica      108
Forming Conditions with Comparisons and Logical Operators     109
Comparing numbers; comparing characters     109
Comparing objects     110
Importing everything in one fell swoop     113
Java's logical operators     113
Building a Nest     115
Choosing among Many Alternatives (Java switch Statements)     116
Your basic switch statement     117
To break or not to break     121
Controlling Program Flow with Loops     123
Repeating Instructions Over and Over Again (Java while Statements)     124
Repeating a Certain Number of Times (Java for Statements)     127
The anatomy of a for statement     128
The world premiere of "Al's All Wet"     130
Repeating Until You Get What You Want (Java do Statements)     131
Reading a single character     134
File handling in Java     135
Variable declarations and blocks     135
Loops Made Painless     136
Don't need no stinking counters     136
Grouping things together     138
Anatomy of an enhanced for loop     139
Working with the Big Picture: Object-Oriented Programming     143
Thinking in Terms of Classes and Objects     145
Defining a Class (What It Means to Be an Account)     145
Declaring variables and creating objects     148
Initializing a variable     150
Using variables     150
Compiling and Running More Than One Class     151
Defining a Method within a Class (Displaying an Account)     152
An account that displays itself     153
The display method's header     155
Sending Values to and from Methods (Calculating Interest)     155
Passing a value to a method     158
Returning a value from the getInterest method     161
Making numbers look good     162
Hiding Details with Accessor Methods (Why You Shouldn't Micromanage a Bank Teller)     165
Good programming     166
Public lives and private dreams: Making a variable name inaccessible     169
Enforcing rules with accessor methods     170
Saving Time and Money: Reusing Existing Code     173
Defining a Class (What It Means to Be an Employee)     174
The last word on employees     175
Putting your class to good use     176
Cutting a check     178
Working with Disk Files (A Brief Detour)     178
Storing data in a file     179
Copying and pasting code     181
Reading from a file     182
Who moved my file?     185
Adding directory names to your filenames     185
Reading a line at a time     186
Defining Subclasses (What It Means to Be a Full-Time Employee or a Part-Time Employee)     188
Creating a subclass     190
Creating subclasses is habit-forming     192
Using Subclasses     193
A program for the minimalist     194
A program for the maximalist     196
Overriding Existing Methods (Changing the Payments for Some of Your Employees)     199
Constructing New Objects     205
Defining Constructors (What It Means to Be a Temperature)     206
What is a temperature?     206
What you can do with a temperature     208
Calling new Temperature (32.0): A case study     209
Enum types as first-class citizens     212
Some things never change     213
More Subclasses (Doing Something about the Weather)     214
Building better temperatures     214
Constructors for subclasses     216
Using all this stuff     217
The default constructor      218
An invisible constructor call     220
A Constructor That Does More     222
Savvy Java Techniques     227
Putting Variables and Methods Where They Belong     229
Defining a Class (What It Means to Be a Baseball Player)     230
Another way to beautify your numbers     231
Using the Player class     231
Nine, count 'em, nine     233
Don't get all GUI on me     234
Tossing an exception from method to method     235
Making Static (Finding the Team Average)     236
Why is there so much static?     238
Displaying the overall team average     239
Static is old hat     242
Could cause static; handle with care     242
Experiments with Variables     243
Putting a variable in its place     244
Telling a variable where to go     247
Passing Parameters     250
Pass by value     250
Returning a result     252
Pass by reference     252
Returning an object from a method     254
Epilogue     256
Using Arrays and Collections to Juggle Values     257
Getting Your Ducks All in a Row      257
Creating an array in two easy steps     260
Storing values     261
Tab stops and other special things     263
Using an array initializer     264
Stepping through an array with the enhanced for loop     264
Searching     266
Arrays of Objects     269
Using the Room class     271
Yet another way to beautify your numbers     274
The conditional operator     275
Command Line Arguments     275
Using command line arguments in a Java program     276
Checking for the right number of command line arguments     278
Setting up JCreator for command line arguments     279
Using Java Collections     282
Collection classes to the rescue     283
Using an ArrayList     283
Using generics (hot stuff!)     286
Testing for the presence of more data     286
Looking Good When Things Take Unexpected Turns     289
Handling Exceptions     290
The parameter in a catch clause     294
Exception types     295
Who's going to catch the exception?     297
Throwing caution to the wind     304
Doing useful things      304
Our friends, the good exceptions     306
Handle an Exception or Pass the Buck     306
Finishing the Job with a finally Clause     311
The Part of Tens     315
Ten Ways to Avoid Mistakes     317
Putting Capital Letters Where They Belong     317
Breaking Out of a switch Statement     318
Comparing Values with a Double Equal Sign     318
Adding Components to a GUI     318
Adding Listeners to Handle Events     319
Defining the Required Constructors     319
Fixing Non-Static References     319
Staying within Bounds in an Array     320
Anticipating Null Pointers     320
Helping Java Find Its Files     321
Ten Sets of Web Resources for Java     323
The Horse's Mouth     323
Finding News, Reviews, and Sample Code     324
Improving Your Code with Tutorials     324
Finding Help on Newsgroups     324
Checking the FAQs for Useful Info     325
Reading Documentation with Additional Commentary     325
Opinions and Advocacy     325
Looking for Java Jobs     326
Becoming Certified in Java     326
Everyone's Favorite Sites     326
Using the CD-ROM     329
What You Can Expect to Find on the CD-ROM     329
System Requirements     330
Using the CD with Microsoft Windows     331
Using the CD with Mac OS     332
Running the Java Code That's in This Book     333
Freeware, Shareware, and Just Plain Ware     334
JCreator     334
Adobe Acrobat Reader     335
Jindent     336
NetCaptor     336
WinOne     336
And, If You Run into Any Trouble     337
Index     339
End-User License Agreement     361
Read More Show Less

Customer Reviews

Average Rating 4
( 5 )
Rating Distribution

5 Star

(3)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(1)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com 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 & Noble.com 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 & Noble.com 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 BN.com 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

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com 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 BN.com. 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 5 Customer Reviews
  • Anonymous

    Posted October 25, 2013

    Love it

    It is a wonderful book

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

    Posted February 25, 2013

    Iop

    This is a great book for anyone interested in java

    Was this review helpful? Yes  No   Report this review
  • Posted July 26, 2011

    Not about Java. It's about JCreator!

    This book is not about java or creating java programs. It is about using some bass akward program called JCreator which costs $89.00 and can only be installed on one machine and heaven help you if that machine breaks and you want to install it on another machine. Don't be fooled by the JCreator LE version which is free, but worthless.

    Was this review helpful? Yes  No   Report this review
  • Posted March 31, 2011

    more from this reviewer

    Awsome Book!

    After playing my favorite game, minecraft, I was encouraged to learn Java, so I picked up this book and now i'm writting programs

    Was this review helpful? Yes  No   Report this review
  • Posted May 15, 2010

    Good and Useful guide

    I've been trying to learn programming for a while, and this book really helped.
    It gives you everything you need in a nice CD along with explaining how to install and use it.
    The chapters are well-organized and very in-depth while not being too complicated.
    Overall I highly recommend it if you wish to learn Java.

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

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