Original filename: Java5thEdit371732.pdf
This PDF 1.7 document has been generated by / A-PDF Watermark 4.5.11 , and has been sent on pdf-archive.com on 23/01/2014 at 02:33, from IP address 76.119.x.x.
The current document download page has been viewed 1622 times.
File size: 4.1 MB (435 pages).
Privacy: public file
Download original PDF file
Jumpin’ Java! The bestselling
Java beginner’s book is now
fully updated for Java 7!
Open the book and find:
• Definitions of the many terms
• The grammar of Java
• How to save time by reusing code
• All about if, for, switch, and
• An overview of object-oriented
• Building blocks — learn to work with Java classes and methods
and add comments
• Hints about handling exceptions
• How to write Java applets
• The Java scoop — get an overview of Java, the enhancements in
Java 7, and the software tools you need
• Get loopy — understand the value of variables and learn to control
program flow with loops or decision-making statements
Java, the object-oriented programming language that works
on almost any computer, is what powers many of those cool
multimedia applications. Thousands have learned Java
programming from previous editions of this book — now
it’s your turn! Whether you’re new to programming or already
know a little Visual Basic or C++, you’ll be doing Java in a jiffy.
• Ten ways to avoid mistakes
• Class it up — explore classes and objects, constructors, and
subclasses, and see how to reuse your code
• A click ahead — experiment with variables and methods, use
arrays and collections to juggle values, and create programs
that respond to mouse clicks
Visit the companion website at www.dummies.com/go/
javafordummies5e for lots of code samples that you can
use in your Java programs
• Combine several smaller programs to
create a bigger program
Go to Dummies.com®
for videos, step-by-step examples,
how-to articles, or to shop!
• Work with new libraries, closure, parallel
frameworks, and other new features
• Create basic Java objects and
• Handle exceptions and events
$29.99 US / $35.99 CN / £21.99 UK
Barry Burd, PhD, is a professor of mathematics and computer science at
Drew University. He frequently contributes to various online technology
resources, including JavaBoutique.com, and is the author of Ruby On Rails
For Dummies and the previous edition of this book.
Barry Burd, PhD
Author of Beginning Programming
with Java For Dummies
Get More and Do More at Dummies.com®
Start with FREE Cheat Sheets
Cheat Sheets include
• Common Instructions
• And Other Good Stuff!
To access the Cheat Sheet created specifically for this book, go to
Get Smart at Dummies.com
Dummies.com makes your life easier with 1,000s
of answers on everything from removing wallpaper
to using the latest version of Windows.
Check out our
• Illustrated Articles
• Step-by-Step Instructions
There’s a Dummies App for This and That
Plus, each month you can win valuable prizes by entering
our Dummies.com sweepstakes. *
Want a weekly dose of Dummies? Sign up for Newsletters on
• Digital Photography
• Microsoft Windows & Office
• Personal Finance & Investing
• Health & Wellness
• Computing, iPods & Cell Phones
• Food, Home & Garden
Find out “HOW” at Dummies.com
*Sweepstakes not currently available in all countries; visit Dummies.com for official rules.
With more than 200 million books in print and over 1,600 unique
titles, Dummies is a global leader in how-to information. Now
you can get the same great Dummies information in an App. With
topics such as Wine, Spanish, Digital Photography, Certification,
and more, you’ll have instant access to the topics you need to
know in a format you can trust.
To get information on all our Dummies apps, visit the following:
www.Dummies.com/go/mobile from your computer.
www.Dummies.com/go/iphone/apps from your phone.
7/6/11 6:57 PM
7/6/11 6:57 PM
by Barry Burd
7/6/11 6:57 PM
Java® For Dummies®, 5th Edition
Wiley Publishing, Inc.
111 River Street
Hoboken, NJ 07030-5774
Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana
Published by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley
& Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://
Trademarks: Wiley, the Wiley Publishing logo, For Dummies, the Dummies Man logo, A Reference for the
Rest of Us!, The Dummies Way, Dummies Daily, The Fun and Easy Way, Dummies.com, Making Everything
Easier, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or
its affiliates in the United States and other countries, and may not be used without written permission. Java
is a registered trademark of Oracle America, Inc. All other trademarks are the property of their respective
owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO
REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF
THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE
CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES
CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE
UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR
OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF
A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE
AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HEREFROM. THE FACT THAT AN ORGANIZATION
OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE.
FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE
CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services, please contact our Customer Care
Department within the U.S. at 877-762-2974, outside the U.S. at 317-572-3993, or fax 317-572-4002.
For technical support, please visit www.wiley.com/techsupport.
Wiley also publishes its books in a variety of electronic formats and by print-on-demand. Not all content
that is available in standard print versions of this book may appear or be packaged in all book formats.
If you have purchased a version of this book that did not include media that is referenced by or accompanies a standard print version, you may request this media by visiting http://booksupport.wiley.
com. For more information about Wiley products, visit us www.wiley.com.
Library of Congress Control Number: 2011932274
ISBN: 978-0-470-37173-2 (pbk); ISBN: 978-1-118-12830-5 (ebk); ISBN: 978-1-118-12831-2 (ebk);
ISBN: 978-1-118-12832-9 (ebk)
Manufactured in the United States of America
7/6/11 6:57 PM
About the Author
Barry Burd received an M.S. degree in Computer Science at Rutgers University
and a Ph.D. in Mathematics at the University of Illinois. As a teaching assistant
in Champaign-Urbana, Illinois, he was elected five times to the university-wide
List of Teachers Ranked as Excellent by their Students.
Since 1980, Dr. Burd has been a professor in the Department of Mathematics
and Computer Science at Drew University in Madison, New Jersey. When he’s
not lecturing at Drew University, Dr. Burd leads training courses for professional programmers in business and industry. He has lectured at conferences
in the United States, Europe, Australia, and Asia. He is the author of several
articles and books, including Android Application Development All-in-One For
Dummies and Beginning Programming with Java For Dummies, both from Wiley
Dr. Burd lives in Madison, New Jersey, with his wife and two children. In his
spare time, he enjoys being a workaholic.
7/6/11 6:57 PM
7/6/11 6:57 PM
Jennie, Sam, and Harriet,
Jennie and Benjamin, Katie and Abram,
7/6/11 6:57 PM