O'Reilly logo
Safari Logo
Start Free Trial
Sign In
Pricing
Enterprise
Java All-in-One For Dummies, 5th Edition by Doug Lowe
Stay ahead with the world's most comprehensive technology and business learning platform.
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.
Start Free Trial
No credit card required
Book 2
Programming Basics
Contents at a Glance
Chapter 1: Java Programming Basics
Looking at the Infamous Hello, World! Program
Dealing with Keywords
Working with Statements
Working with Blocks
Creating Identifiers
Crafting Comments
Introducing Object-Oriented Programming
Importing Java API Classes
Chapter 2: Working with Variables and Data Types
Declaring Variables
Initializing Variables
Using Final Variables (Constants)
Working with Primitive Data Types
Working with Strings
Converting and Casting Numeric Data
Thinking Inside the Box
Understanding Scope
Shadowing Variables
Printing Data with System.out
Getting Input with the Scanner Class
Getting Input with the JOptionPane Class
Using enum to Create Your Own Data Types
Chapter 3: Working with Numbers and Expressions
Working with Arithmetic Operators
Dividing Integers
Combining Operators
Using the Unary Plus and Minus Operators
Using Increment and Decrement Operators
Using the Assignment Operator
Using Compound Assignment Operators
Using the Math Class
Formatting Numbers
Recognizing Weird Things about Java Math
Chapter 4: Making Choices
Using Simple Boolean Expressions
Using if Statements
Using Mr. Spock’s Favorite Operators (Logical Ones, of Course)
Using the Conditional Operator
Comparing Strings
Chapter 5: Going Around in Circles (Or, Using Loops)
Using Your Basic while Loop
Breaking Out of a Loop
Looping Forever
Using the continue Statement
Running do-while Loops
Validating Input from the User
Using the Famous ...
With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.
Start Free Trial
No credit card required