Sams Teach Yourself Java in 24 Hours - Rogers Cadenhead

Sams Teach Yourself Java in 24 Hours

Buch | Softcover
432 Seiten
2009 | 5th edition
Sams Publishing (Verlag)
978-0-672-33076-6 (ISBN)
32,95 inkl. MwSt
zur Neuauflage
  • Titel erscheint in neuer Auflage
  • Artikel merken
Zu diesem Artikel existiert eine Nachauflage
In 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 solid understanding of the basic concepts and terminology.



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 and XML data
Master best practices for object-oriented programming
Create flexible, interoperable web services with JAX-WS
Integrate graphics into your applications

Rogers Cadenhead is a writer, computer programmer, and web developer who has written 21 books on Internet-related topics, including Sams Teach Yourself Java 6 in 21 Days. He maintains the Drudge Retort and other websites that receive more than seven million visits a year. This book’s official website is www.java24hours.com.

Introduction

 

HOUR 1: Becoming a Programmer



Choosing a Language

Telling the Computer What to Do

How Programs Work

How Programs Don’t Work

Choosing a Java Programming Tool

Workshop: Installing a Java Development Tool

 

HOUR 2: Writing Your First Program

What You Need to Write Programs

Creating the Saluton Program

Beginning the Program

Storing Information in a Variable

Saving the Finished Product

Compiling the Program into a Class File

Fixing Errors

Workshop: Running a Java Program

 

HOUR 3: Vacationing in Java

First Stop: Sun Microsystems

Going to School with Java

Lunch in JavaWorld

Watching the Skies at NASA

Getting Down to Business

Stopping by Gamelan to Ask for Directions

Workshop: Venturing into Another World

 

HOUR 4: Understanding How Java Programs Work

Creating an Application

Sending Arguments to Applications

Workshop: Creating an Applet

 

HOUR 5: Storing and Changing Information in a Program

Statements and Expressions

Assigning Variable Types

Naming Your Variables

Storing Information in Variables

All About Operators

Workshop: Using Expressions

 

HOUR 6: Using Strings to Communicate

Storing Text in Strings

Displaying Strings in Programs

Using Special Characters in Strings

Pasting Strings Together

Using Other Variables with Strings

Advanced String Handling

Workshop: Presenting Credits

 

HOUR 7: Using Conditional Tests to Make Decisions

Testing a Condition

if Statements

if-else Statements

switch Statements

The Conditional Operator

Workshop: Watching the Clock

 

HOUR 8: Repeating an Action with Loops

for Loops

while Loops

do-while Loops

Exiting a Loop

Naming a Loop

Workshop: Testing Your Computer Speed

 

HOUR 9: Storing Information with Arrays

Creating Arrays

Using Arrays

Multidimensional Arrays

Sorting an Array

Workshop: Array of Prizes, Indeed

 

HOUR 10: Creating Your First Object

How Object-Oriented Programming Works

Objects in Action

What Objects Are

Understanding Inheritance

Building an Inheritance Hierarchy

Converting Objects and Simple Variables

Workshop: Creating an Object

 

HOUR 11: Describing What Your Object Is Like

Creating Variables

Creating Class Variables

Creating Behavior with Methods

Putting One Class Inside Another

Using the this Keyword

Workshop: Using Class Methods and Variables

 

HOUR 12: Making the Most of Existing Objects

The Power of Inheritance

Establishing Inheritance

Working with Existing Objects

Storing Objects of the Same Class in Vectors

Workshop: Creating a Subclass

 

HOUR 13: Building a Simple User Interface

Swing and the Abstract Windowing Toolkit

Using Components

Workshop: Creating Your Own Component

 

HOUR 14: Laying Out a User Interface

Using Layout Managers

Workshop: Laying Out an Application

 

HOUR 15: Responding to User Input

Getting Your Programs to Listen

Setting Up Components to Be Heard

Handling User Events

Workshop: A Little Lotto Madness

 

HOUR 16: Building a Complex User Interface

Scroll Panes

Sliders

Change Listeners

Workshop: Using Image Icons and Toolbars

 

HOUR 17: Creating Interactive Web Programs

Standard Applet Methods

Putting an Applet on a Web Page

Creating an Applet

Sending Parameters from a Web Page

Workshop: Handling Parameters in an Applet

 

HOUR 18: Handling Errors in a Program

Exceptions

Throwing Exceptions

Workshop: Throwing and Catching

Exceptions

 

HOUR 19: Creating a Threaded Program

Threads

Working with Threads

Starting with init()

Catching Errors as You Set Up URLs

Handling Screen Updates in the paint() Method

Starting the Thread

Handling Mouse Clicks

Workshop: Revolving Links

 

HOUR 20: Reading and Writing Files

Streams

Writing Data to a Stream

Workshop: Reading and Writing Configuration

Properties

 

HOUR 21: Reading and Writing XML Data

Creating an XML File

Reading an XML File

Workshop: Reading RSS Syndication Feeds

 

HOUR 22: Creating Web Services with JAX-WS

Defining a Service Endpoint Interface

Creating a Service Implementation Bean

Publishing the Web Service

Using Web Service Definition Language

Files

Workshop: Creating a Web Service Client

 

HOUR 23: Working with Graphics

Using the Font Class

Using the Color Class

Creating Custom Colors

Drawing Lines and Shapes

Workshop: Baking a Pie Graph

 

HOUR 24: Creating a Browser Game

Designing the Game

Creating a Custom Button in Swing

Creating a Button’s Behavior and Attributes

Clearing Empty Squares with Recursion

Arranging Components as a Grid

Generating Random Numbers

Using the Ternary Operator

Workshop: Publishing an Applet on the Web

 

APPENDIX A: Using the NetBeans Integrated Development Environment

Installing NetBeans

Creating a New Project

Creating a New Java Class

Running the Application

Fixing Errors

 

APPENDIX B: Where to Go from Here: Java Resources

Other Books to Consider

Sun’s Official Java Site

Other Java Websites

Internet Relay Chat

Job Opportunities

 

APPENDIX C: This Book’s Website

 

Index


 

Erscheint lt. Verlag 5.11.2009
Reihe/Serie Sams Teach Yourself
Verlagsort Indianapolis
Sprache englisch
Maße 229 x 191 mm
Gewicht 832 g
Themenwelt Informatik Programmiersprachen / -werkzeuge Java
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-672-33076-8 / 0672330768
ISBN-13 978-0-672-33076-6 / 9780672330766
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
mit über 150 Workouts in Java und Python

von Luigi Lo Iacono; Stephan Wiefling; Michael Schneider

Buch (2023)
Carl Hanser (Verlag)
29,99
Einführung, Ausbildung, Praxis

von Christian Ullenboom

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90