Sams Teach Yourself Java in 24 Hours (Sams Teach Yourself Series)

Paperback
from $0.00

Author: Rogers Cadenhead

ISBN-10: 0672330768

ISBN-13: 9780672330766

Category: Network Programming

Search in google:

Sams Teach Yourself Java™ in 24 HoursRogers CadenheadFifth EditionCovers Java 6Includes Interactive Online Learning LabNow in Full ColorIn just 24 lessons of one hour or less, you can learn how to create Java applications with the free NetBeans visual editing tools.Using a straightforward, step-by-step approach, popular author Rogers Cadenhead helps you master the skills and technology you need to create desktop and web programs, web services, and even a browser game in Java.Each lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success.Full-color figures and clear step-by-step instructions visually show you how to program with Java.Quizzes and Exercises at the end of each chapter help you test your knowledge.Notes, Tips, and Cautions provide related information, advice, and warnings.Learn how to… Set up your Java programming environment Write your first working program in just minutes Control program decisions and behavior Store and work with information Build straightforward user interfaces Create interactive web programs Use threading to build more responsive programs Build a browser-based game from start to finish Read and write files andMaster best practices for object-oriented programming Create flexible, interoperable web services with JAX-WS Integrate graphics into your applicationsRogers Cadenhead is a writer, computer programmer, and web developer who has written 21 books on Java and Internet-related topics, including Sams Teach Yourself Java 6 in 21 Days. He maintains the Drudge Retort and several other popular websites that receive more than seven million visits a year.Free Access to Online Learning LabRegister your book at informit.com/register for free, exclusive access to the Online Learning Labto supplement this book’s lessons: Video walkthroughs to show you how to complete the step-by-step examples in the book Fast and fun online quizzes to test your understanding of each lesson Source code and files for the book’s examples Updates or corrections as they become availableCategory: ProgrammingCovers: Java 6 Standard Edition (SE)User Level: Beginning—Intermediate Library Journal Cadenhead's Teach Yourself Java 2 in 24 Hours is a definite beginner's book, a self-tutorial in 24 one-hour chapters. The guides on networking, Threads (the ability of Java to multitask by allowing for multiple processes and actions at the same time), and Swing (a powerful Java interface package for visual design) are for advanced Java programmers but will fit well within most libraries. Copyright 1999 Cahners Business Information.

Introduction 1Hour 1 Becoming a ProgrammerChoosing a Language 4Telling the Computer What to Do 5How Programs Work 7How Programs Don't Work 8Choosing a Java Programming Tool 8Workshop: Installing a Java Development Tool 9Hour 2 Writing Your First ProgramWhat You Need to Write Programs 15Creating the Saluton Program 16Beginning the Program 16Storing Information in a Variable 19Saving the Finished Product 20Compiling the Program into a Class File 21Fixing Errors 21Workshop: Running a Java Program 23Hour 3 Vacationing in JavaFirst Stop: Sun Microsystems 27Going to School with Java 29Lunch in JavaWorld 31Watching the Skies at NASA 33Getting Down to Business 34Stopping by Gamelan to Ask for Directions 35Workshop: Venturing into Another World 36Hour 4 Understanding How Java Programs WorkCreating an Application 41Sending Arguments to Applications 43Workshop: Creating an Applet 45Hour 5 Storing and Changing Information in a ProgramStatements and Expressions 49Assigning Variable Types 50Naming Your Variables 53Storing Information in Variables 54AN About Operators 55Workshop: Using Expressions 59Hour 6 Using Strings to CommunicateStoring Text in Strings 65Displaying Strings in Programs 66Using Special Characters in Strings 67Pasting Strings Together 68Using Other Variables with Strings 68Advanced String Handling 70Workshop: Presenting Credits 72Hour 7 Using Conditional Tests to Make DecisionsTesting a Condition 79if Statements 80if-else Statements 83switch Statements 84The Conditional Operator 85Workshop: Watching theClock 86Hour 8 Repeating an Action with Loopsfor Loops 95while Loops 98do-while Loops 99Exiting a Loop 100Naming a Loop 101Workshop: Testing Your Computer Speed 103Hour 9 Storing Information with ArraysCreating Arrays 110Using Arrays 111Multidimensional Arrays 113Sorting an Array 114Workshop: Array of Prizes, indeed 116Hour 10 Creating Your First ObjectHow Object-Oriented Programming Works 133Objects in Action 134What Objects Are 136Understanding Inheritance 137Building an Inheritance Hierarchy 137Converting Objects and Simple Variables 139Workshop: Creating an Object 134Hour 11 Describing What Your Object Is LikeCreating Variables 141Creating Class Variables 144Creating Behavior with Methods 144Putting One Class Inside Another 150Using the this Keyword 151Workshop: Using Class Methods and Variables 152Hour 12 Making the Most of Existing ObjectsThe Power of Inheritance 159Establishing Inheritance 161Working with Existing Objects 163Storing Objects of the Same Class in Vectors 164Workshop: Creating a Subclass 168Hour 13 Building a Simple User InterfaceSwing and the Abstract Windowing Toolkit 173Using Components 174Workshop: Creating Your Own Component 183Hour 14 Laying Out a User InterfaceUsing Layout Managers 189Workshop: Laying Out an Application 194Hour 15 Responding to User InputGetting Your Programs to Listen 203Setting Up Components to Be Heard 204Handling User Events 204Workshop: A Littie Lotto Madness 209Hour 16 Building a Complex User InterfaceScroll Panes 221Sliders 224Change Listeners 225Workshop: Using Image Icons and Toolbars 229Hour 17 Creating Interactive Web ProgramsStandard Applet Methods 235Putting an Applet on a Web Page 238Creating an Applet 239Sending Parameters from a Web Page 242Workshop: Handling Parameters in an Applet 243Hour 18 Handling Errors in a ProgramExceptions 249Throwing Exceptions 255Workshop: Throwing and Catching Exceptions 257Hour 19 Creating a Threaded ProgramThreads 265Working with Threads 270Starting with init() 272Catching Errors as You Set Up URLs 272Handling Screen Updates in the paint() Method 273Starting the Thread 274Handling Mouse Clicks 276Workshop: Revolving Links 276Hour 20 Reading and Writing FilesStreams 283Writing Data to a Stream 290Workshop: Reading and Writing Configuration Properties 292Hour 21 Reading and Writing XML DataCreating an XML File 299Reading an XML File 302Workshop: Reading RSS Syndication Feeds 307Hour 22 Creating Web Services with JAX-WSDefining a Service Endpoint Interface 313Creating a Service Implementation Bean 316Publishing the Web Service 317Using Web Service Definition Language Files 319Workshop: Creating a Web Service Client 321Hour 23 Working with GraphicsUsing the Font Class 327Using the color Class 328Creating Custom Colors 329Drawing Lines and Shapes 329Workshop: Baking a Pie Graph 333Hour 24 Creating a Browser Game Designing the Game 343Creatinga Custom Button in Swing 345Creating a Button's Behavior and Attributes 346Clearing Empty Squares with Recursion 347Arranging Components as a Grid 352Generating Random Numbers 353Using the Ternary Operator 354Workshop: Publishing an Applet on the Web 357Appendix A Using the NetBeans Integrated Development EnvironmentInstalling NetBeans 371Creating a New Project 372Creating a New Java Class 374Running the Application 376Fixing Errors 377Appendix B Where to Go from Here: Java ResourcesOther Books to Consider 379Sun's Official Java Site 380Other Java Websites 380Internet Relay Chat 382Job Opportunities 383Appendix C This Book's WebsiteIndex 387