Java essentials
Book - 2024
Swiftly brush up on the foundations of Java programming Java Essentials For Dummies is a reliable and succinct reference on the core components of Java--the multifaceted general-purpose language used for desktop, mobile, and web applications. This straightforward book gets right to the point--eliminating review material and wordy explanations--so you get what you need, fast. Strengthen your understanding of the basics of coding with Java Review what you've already learned or pick up key skills Use Java to build a variety of applications and more Jog your memory on the essentials as you work and get clear answers to your questions. Perfect for supplementing classroom learning, reviewing for a certification, or staying knowledgeable on t...he job, Java Essentials For Dummies is a direct reference that's great to keep on hand as an everyday desk reference.--Provided by publisher.
- Subjects
- Genres
- Instructional and educational works
Informational works - Published
-
Hoboken, New Jersey :
John Wiley & Sons, Inc
[2024]
- Language
- English
- Main Author
- Other Authors
- Physical Description
- ix, 196 pages : illustrations ; 22 cm
- Bibliography
- Includes index.
- ISBN
- 9781394296972
- Introduction
- About This Book
- Foolish Assumptions
- Icons Used in This Book
- Where to Go from Here
- Chapter 1. Installing and Using Java Tools
- Downloading and installing the Java Development Kit
- Downloading the JDK
- Installing the JDK
- Perusing the JDK folders
- Setting the JAVA_HOME and path variables
- Confirming Your Java Version
- Chapter 2. Working with TextPad
- Downloading and Installing TextPad
- Editing Source Files
- Compiling a Program
- Running a Java Program
- Chapter 3. Java Programming Basics
- Looking at the Venerable Hello, World! Program
- Dealing with Keywords
- Working with Statements
- Types of statements
- White space
- Working with Blocks
- Creating Identifiers
- Crafting Comments
- End-of-line comments
- Traditional comments
- Introducing Object-Oriented Programming
- Understanding classes and objects
- Understanding static methods
- Creating an object from a class
- Viewing a program that uses an object
- So what's the difference?
- Importing Java API Classes
- Chapter 4. Working with Variables and Data Types
- Declaring Variables
- Declaring two or more variables in one statement
- Declaring class variables
- Declaring instance variables
- Declaring local variables
- Initializing Variables
- Initializing variables with assignment statements
- Initializing variables with initializers
- Using Final Variables (Constants)
- Working with Primitive Data Types
- Integer types
- Floating-point types
- The char type
- The Boolean type
- Using wrapper classes
- Using reference types
- Working with Strings
- Declaring and initializing strings
- Combining strings
- Converting primitives to strings
- Converting strings to primitives
- Understanding Scope
- Chapter 5. Working with Numbers and Expressions
- Working with Arithmetic Operators
- Using Compound Assignment Operators
- Using the Math Class
- Using constants of the Math class
- Working with mathematical functions
- Creating random numbers
- Rounding functions
- Formatting Numbers
- Chapter 6. Making Choices
- Using Simple Boolean Expressions
- Using if Statements
- Simple if statements
- If-else statements
- Else-if statements
- Using Mr. Spock's Favorite Operators (Logical Ones, of Course)
- Using the
- Using the & and && operators
- Using the
- Combining logical operators
- Using the switch Statement
- Viewing an example else-if program
- Creating a better version of the example program
- Chapter 7. Going Around in Circles (or, Using Loops)
- Using Your Basic while Loop
- The while statement
- A counting loop
- Breaking Out of a Loop
- Using the continue Statement
- Running do-while Loops
- Using the Famous for Loop
- Understanding the formal format of the for loop
- Scoping out the counter variable
- Counting even numbers
- Counting backward
- Chapter 8. Adding Some Methods to Your Madness
- The Basics of Making Methods
- Methods That Return Values
- Declaring the method's return type
- Using the return statement to return the value
- Using a method that returns a type
- You gotta have a proper return statement
- Methods That Take Parameters
- Chapter 9. Handling Exceptions
- Understanding Exceptions
- Catching Exceptions
- A simple example
- Another example
- Handling Exceptions with a Preemptive Strike
- Catching All Exceptions at Once
- Using a finally Block
- Chapter 10. Making Your Own Classes
- Declaring a Class
- Picking class names
- Knowing what goes in the class body
- Seeing where classes live
- Working with Members
- Understanding fields
- Understanding instance methods
- Understanding visibility
- Using Getters and Setters
- Creating Constructors
- Creating basic constructors
- Creating default constructors
- Calling other constructors
- Chapter 11. Using Subclasses and Inheritance
- Introducing Inheritance
- Motorcycles, trains, and automobiles
- Game play
- A businesslike example
- Inheritance hierarchies
- Creating Subclasses
- Overriding Methods
- Protecting Your Members
- Using the this and super Keywords in Your Subclasses
- Understanding Inheritance and Constructors
- Using the final Keyword
- Final methods
- Final classes
- Chapter 12. Using Arrays
- Understanding Arrays
- Creating Arrays
- Initializing an Array
- Using for Loops with Arrays
- Solving a homework problem with an array
- Using the enhanced for loop
- Using Arrays with Methods
- Using Varargs
- Using Two-Dimensional Arrays
- Creating a two-dimensional array
- Accessing two-dimensional array elements
- Initializing a two-dimensional array
- Using jagged arrays
- Chapter 13. Ten Techniques for Easier Java Coding
- Compiling a Java Program from the Command Line
- Running a Java Program from the Command Line
- Casting Numeric Data
- Printing Data with System.out
- Getting Input with the JOptionPane Class
- Using the Unary Pius and Minus Operators
- Using the Increment and Decrement Operators
- Using the Conditional Operator
- Comparing Strings
- Nesting Your Loops
- Index