- Subjects
- Published
-
[Lebanon, Indiana] :
Pearson
[2018]
- Language
- English
- Main Author
- Edition
- Eighth edition
- Item Description
- "Covers Java 9 and Android"--Cover.
- Physical Description
- ix, 437 pages : color illustrations ; 24 cm
- Bibliography
- Includes index.
- ISBN
- 9780672337949
- Introduction
- Part I. Getting Started
- Hour 1. Becoming a Programmer
- Choosing a Language
- Telling the Computer What to Do
- How Programs Work
- When Programs Don't Work
- Choosing a Java Programming Tool
- Installing a Java Development Tool
- Hour 2. Writing Your First Program
- What You Need to Write Programs
- Creating the Saluton Program
- Beginning the Program
- The class Statement
- What the main Statement Does
- Those Squiggly Bracket Marks
- Storing Information in a Variable
- Displaying the Contents of a Variable
- Saving the Finished Product
- Compiling the Program into a Class File
- Fixing Errors
- Running a Java Program
- Hour 3. Vacationing in Java
- First Stop: Oracle
- A Brief History of Java
- Going to School with Java
- Lunch at Food Network
- Watching the Skies at NASA
- Getting Down to Business
- Stopping by SourceForge for Directions
- Hour 4. Understanding How Java Programs Work
- Creating an Application
- Sending Arguments to Applications
- The Java Class Library
- Trying Java Statements in JShell
- Part II. Learning the Basics of Programming
- Hour 5. Storing and Changing information in a Program
- Statements and Expressions
- Assigning Variable Types
- Integers and Floating-Point Numbers
- Characters and Strings
- Other Numeric Variable Types
- The boolean Variable Type
- Naming Your Variables
- Storing Information in Variables
- All About Operators
- Incrementing and Decrementing a Variable
- Operator Precedence
- 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
- Comparing Two Strings
- Determining the Length of a String
- Copying a String with a New Case
- Looking for a String
- Presenting Credits
- Hour 7. Using Conditional Tests to Make Decisions
- If Statements
- Less-Than and Greater-Than Comparisons
- Equal and Not Equal Comparisons
- Organizing a Program with Block Statements
- If-else Statements
- Switch Statements
- The Ternary Operator
- Watching the Clock
- Hour 8. Repeating an Action with Loops
- For Loops
- While Loops
- Do-while Loops
- Exiting a Loop
- Naming a Loop
- Complex for Loops
- Testing Your Computer Speed
- Part III. Working with Information in New Ways
- Hour 9. Storing information wild Arrays
- Creating Arrays
- Using Arrays
- Multidimensional Arrays
- Sorting an Array
- Counting Characters in Strings
- 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
- Casting Simple Variables
- Casting Objects
- Converting Simple Variables to Objects and Back
- Creating an Object
- Hour 11. Describing What Your Object is Like
- Creating Variables
- Creating Class Variables
- Creating Behavior with Methods
- Declaring a Method
- Similar Methods with Different Arguments
- Constructors
- Class Methods
- Variable Scope within Methods
- Putting One Class Inside Another
- Using the this Keyword
- Using Class Methods and Variables
- Hour 12. Making the Most of Existing Objects
- The Power of Inheritance
- Inheriting Behavior and Attributes
- Overriding Methods
- Establishing Inheritance
- Using this and super in a Subclass
- Working with Existing Objects
- Storing Objects of the Same Class in Array Lists
- Looping Through an Array List
- Creating a Subclass
- Part IV. Moving into Advanced Topics
- Hour 13. Storing Objects in Data Structures
- Array Lists
- Hash Maps
- Hour 14. Handling Errors in a Program
- Exceptions
- Catching Exceptions in a try-catch Block
- Catching Several Different Exceptions
- Handling Something After an Exception
- Throwing Exceptions
- Ignoring Exceptions
- Exceptions That Don't Need catch
- Throwing and Catching Exceptions
- Hour 15. Creating a Threaded Program
- Threads
- Slowing Down a Program
- Creating a Thread
- Working with Threads
- The class Declaration
- Setting Up Variables
- The Constructor
- Catching Errors as You Set Up URLs
- Starting the Thread
- Running the Thread
- Handling Mouse Clicks
- Displaying Revolving Links
- Stopping a Thread
- Hour 16. Using inner Classes and Closures
- Inner Classes
- Anonymous Inner Classes
- Closures
- Part V. Programming a Graphical User Interface
- Hour 17. Building a Simple User Interface
- Swing and the Abstract Windowing Toolkit
- Using Components
- Windows and Frames
- Buttons
- Labels and Text Fields
- Check Boxes
- Combo Boxes
- Text Areas
- Panels
- Creating Your Own Component
- Hour 18. Laying Out a User Interface
- Using Layout Managers
- The GridLayout Manager
- The BorderLayout Manager
- The BoxLayout Manager
- Separating Components with insets
- Laying Out an Application
- Hour 19. Responding to User input
- Getting Your Programs to Listen
- Setting Up Components to Be Heard
- Handling User Events
- Check Box and Combo Box Events
- Keyboard Events
- Enabling and Disabling Components
- Completing a Graphical Application
- Part VI. Writing Internet Applications
- Hour 20. Reading and Writing Files
- Streams
- Files
- Reading Data from a Stream
- Buffered Input Streams
- Writing Data to a Stream
- Reading and Writing Configuration Properties
- Hour 21. Using Java 9's New HTTP Client
- Java Modules
- Making an HTTP Request
- Saving a File from the Web
- Posting Data on the Web
- Hour 22. Creating Java2D Graphics
- Using the Font Class
- Using the Color Class
- Creating Custom Colors
- Drawing Lines and Shapes
- Drawing Lines
- Drawing Rectangles
- Drawing Ellipses and Circles
- Drawing Arcs
- Baking a Pie Graph
- Hour 23. Creating Minecraft Mods with Java
- Setting Up a Minecraft Server
- Fixing Problems Running the Server
- Connecting to the Server
- Fixing a Server Connection Problem
- Creating Your First Mod
- Teaching Zombies to Ride Horses
- Finding All Mobs (and Killing Them)
- Writing a Mod that Can Build Things
- Hour 24. Writing Android Apps
- Introduction to Android
- Creating an Android App
- Exploring a New Android Project
- Creating an App
- Setting Up an Android Emulator
- Running the App
- Designing a Real App
- Organizing Resources
- Configuring the App's Manifest File
- Designing a User Interface
- Writing Java Code
- Appendixes
- 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
- Oracle's Official Java Site
- Java Class Documentation
- Other Java Websites
- This Book's Official Site
- Workbench
- Slashdot
- Other Java Weblogs
- InformIT
- Stack Overflow
- JavaWorld Magazine
- Developer.com's Java Directory
- Java Meetings
- Job Opportunities
- Appendix C. This Book's Website
- Appendix D. Fixing a Problem with the Android Studio Emulator
- Problems Running an App
- Install HAXM in Android Studio
- Install HAXM on Your Computer
- Checking BIOS Settings
- Appendix E. Fixing Package Not Visible Errors in NetBeans
- Adding Module Info
- Index