Java Programming Applications

Author(s): Michael Robinson

Edition: 1

Copyright: 2016

Pages: 526

Choose Your Format

Ebook

$106.96

ISBN 9781524900847

Details Electronic Delivery EBOOK 180 days

JAVA Programming Applications teaches readers computer programing using the Java Language - no previous programming knowledge is required.

Using over 100 of the author’s own very clearly documented Java programs, the publication teaches in detail and step by step, how to create very useful programs. All programing applications examples presented here are based on simple every day common situations. No math, physics, statistics or other challenging topics are used as examples.

 

The knowledge acquired from this book will help students greatly in learning other programing languages. Java is a very clear language to learn programing and most of their functions are similarly implemented in other languages.

 

As of this writing the Java language is found everywhere. According to Oracle Corporation, owners of Java https://www.java.com/en/about/:

 

  • 97% of Enterprise Desktops Run Java
  • 89% of Desktops (or Computers) in the U.S. Run Java
  • 9 Million Java Developers Worldwide
  • #1 Choice for Developers
  • #1 Development Platform
  • 3 Billion Mobile Phones Run Java
  • 100% of Blu-ray Disc Players Ship with Java
  • 5 Billion Java Cards in Use
  • 125 million TV devices run Java
  • 5 of the Top 5 Original Equipment Manufacturers Ship Java ME

Preface

Purpose/Goals

The World’s First Computer Programmer

Our Logo’s Meaning

Plan Your Work then Work Your Plan.

Acknowledgments

Your Feedback is Needed!

Further Reading

Colophon

Chapter 1: The Basics

What is Java?

What is an Operating System?

What is a Computer Program Language?

What Do We Need? A computer

The Java JDK

Editors

Graphical User Interface (GUI)

IDE Programming Editors

NetBeans

Using NetBeans

Eclipse

Using Eclipse

Text Editors

Notepad in Linux

Gedit in Linux

Nano in Linux.
Terminal Mode/Command Line

Creating Java Programs

What is Compiling in Java?

PseudoCode

PseudoCode Example

Summary

Key Terms

Exercises

References

Chapter 2: Getting Started

Let’s Start Programming

Documenting a Program

Javadoc Comments

What Are Imports?

What is a Class?

Creating a Class

What is a Method?

Creating a Method

Indentation

Print Commands

System.out.print

System.out.println

System.out.printf

Summary

Key Terms

Exercises

References

Chapter 3: Basic Tools

Numerical Systems

Decimal Numerical System

Binary Numerical System

Why Binary

8 Bits Byte Samples

Hexadecimal Numerical System

ASCII Codes Table

ASCII Tables

The Unicode Standard

Data Types
Primitive Data Types

byte

char

int

short

long

float

double

boolean

What Can We Do with Primitives?

Problems Choosing the Wrong Date Types

Creating a Variable and Assigning a Value to it

Numerical Operators

Other Operators

Operators > and <

Operators >= and <=

Operators =, ==, !=

Operators &&

Operators ||

Operator %

Math Using Primitives

Wrapper

String Class Data Types

First String Program

Summary

Key Terms

Exercises

References

Chapter 4: Building a House

Wrappers

Calling Methods

Methods That Do Not Pass Any Data

Methods That Accept Data

Methods That Return Data

Pause Program

Variables Scope

Global Variables

Private – Final Variables

Local Variables

Reading The Keyboard Using Scanner Class
Summary

Key Terms

Exercises

References

Chapter 5: if Commands

if Command

Plain if

Other Plain if Example

if_else

if else if

Nested if

Ternary if

Summary

Key Terms

Exercises

References.

Chapter 6: Loops

Loops

for loops

while Loop

Boolean Conditions in while Loops

Endless while Loop

do while Loops

Enhanced for Loops (Summary)

Switch Command

Limitations of the Switch Command

switch Command Using int as Input

switch Command Using char as Input

Summary

Key Terms

Exercises

References

Chapter 7: Data Structures – Arrays

Data Structures

Arrays

One Dimension Array
Declaring/Creating One Dimension Arrays

Allocating Space to Declared Arrays:

Declare and Allocate at the Same Time:

Create, Allocate and Load Data into Arrays:

Load Data to a Declared Array

Printing all Values Inside this Array

Multi Dimensional Arrays

Two Dimension Arrays

Two Dimensional int Arrays

Two Dimensional String Arrays (Using Array’s Length)

Three Multidimensional Arrays

Parallel Arrays.

Enhanced for Loops

String Tokenizer

Summary

Key Terms

Exercises

References

Chapter 8: Data Structures – ArrayList

ArrayList

IteratorUsing Iterator in an ArrayList

Copying Arrays into an ArrayList Modify and Back

Object Data Types

Summary

Key Terms

Exercises

References

Chapter 9: Data Structures – Files

What is a File?

What is a Record?

Catching Errors Exceptions In Data Files

Text Files

Text Files Using:

FileWriter, PrintWriter, FileReader and BufferedReader

Text Files Using the File Class

Exceptions Handling

Text Files Using the Formatter Class
Text Files Using the Scanner Class

Large Files. Writing and Reading

Printing Numbers Using Decimal Format

Binary Files

Summary

Key Terms

Exercises

References

Chapter 10: External Classes,

Methods, This, Constructors

External Classes

Final Variables

toString

What is ‘this’?

What is a Constructor?

Simple Constructors

What is a Variable-Length Argument List in Methods?

Object Data Types

What is the Meaning of main( String arg[] )?

Summary

Key Terms

Exercises

References

Chapter 11: GUI Simple Applications

What is GUI (Graphical User Interface)?

What are Dialog Boxes?

Message Dialog Boxes

Input Dialog Boxes

What is a Frame?

Creating a Frame

Creating a Small Frame

Creating a Full Size Frame

Summary

Key Terms

Exercises

References

Chapter 12: Sorting and Recursion

What is Sorting?

Swap - Placing Data in Order

Bubble Sort

Recursion

Summary

Key Terms

Exercises

References

Chapter 13: Inheritance and Polymorphism

What is Inheritance?

Polymorphism

Final Methods

Final Classes

Protected Classes Methods and Variables

Summary

Key Terms

Exercises

References

Chapter 14: Interfaces and Abstraction

What is an Interface?

Data Abstraction

Data Abstraction vs Interfaces

Summary

Key Terms

Exercises

References

Chapter 15: Data Structures Implementations

Linked List

Overloading

Stacks

Queue

Summary

Key Terms
Exercises

References

Chapter 16: Complex Programming

Caller Program

Abstract Classes

Classes Inside Classes

Interfaces

Extends/Inhereting

Summary

Key Terms

Exercises

References

Chapter 17: Miscellaneous

Generic Methods

Introduction to Java Collection Interface

Overriding equals and toString methods

How to Reduce Typing

ASCII Codes Program

Javadoc Summary

Key Terms

Exercises

References

Glossary

Index

Michael Robinson

JAVA Programming Applications teaches readers computer programing using the Java Language - no previous programming knowledge is required.

Using over 100 of the author’s own very clearly documented Java programs, the publication teaches in detail and step by step, how to create very useful programs. All programing applications examples presented here are based on simple every day common situations. No math, physics, statistics or other challenging topics are used as examples.

 

The knowledge acquired from this book will help students greatly in learning other programing languages. Java is a very clear language to learn programing and most of their functions are similarly implemented in other languages.

 

As of this writing the Java language is found everywhere. According to Oracle Corporation, owners of Java https://www.java.com/en/about/:

 

  • 97% of Enterprise Desktops Run Java
  • 89% of Desktops (or Computers) in the U.S. Run Java
  • 9 Million Java Developers Worldwide
  • #1 Choice for Developers
  • #1 Development Platform
  • 3 Billion Mobile Phones Run Java
  • 100% of Blu-ray Disc Players Ship with Java
  • 5 Billion Java Cards in Use
  • 125 million TV devices run Java
  • 5 of the Top 5 Original Equipment Manufacturers Ship Java ME

Preface

Purpose/Goals

The World’s First Computer Programmer

Our Logo’s Meaning

Plan Your Work then Work Your Plan.

Acknowledgments

Your Feedback is Needed!

Further Reading

Colophon

Chapter 1: The Basics

What is Java?

What is an Operating System?

What is a Computer Program Language?

What Do We Need? A computer

The Java JDK

Editors

Graphical User Interface (GUI)

IDE Programming Editors

NetBeans

Using NetBeans

Eclipse

Using Eclipse

Text Editors

Notepad in Linux

Gedit in Linux

Nano in Linux.
Terminal Mode/Command Line

Creating Java Programs

What is Compiling in Java?

PseudoCode

PseudoCode Example

Summary

Key Terms

Exercises

References

Chapter 2: Getting Started

Let’s Start Programming

Documenting a Program

Javadoc Comments

What Are Imports?

What is a Class?

Creating a Class

What is a Method?

Creating a Method

Indentation

Print Commands

System.out.print

System.out.println

System.out.printf

Summary

Key Terms

Exercises

References

Chapter 3: Basic Tools

Numerical Systems

Decimal Numerical System

Binary Numerical System

Why Binary

8 Bits Byte Samples

Hexadecimal Numerical System

ASCII Codes Table

ASCII Tables

The Unicode Standard

Data Types
Primitive Data Types

byte

char

int

short

long

float

double

boolean

What Can We Do with Primitives?

Problems Choosing the Wrong Date Types

Creating a Variable and Assigning a Value to it

Numerical Operators

Other Operators

Operators > and <

Operators >= and <=

Operators =, ==, !=

Operators &&

Operators ||

Operator %

Math Using Primitives

Wrapper

String Class Data Types

First String Program

Summary

Key Terms

Exercises

References

Chapter 4: Building a House

Wrappers

Calling Methods

Methods That Do Not Pass Any Data

Methods That Accept Data

Methods That Return Data

Pause Program

Variables Scope

Global Variables

Private – Final Variables

Local Variables

Reading The Keyboard Using Scanner Class
Summary

Key Terms

Exercises

References

Chapter 5: if Commands

if Command

Plain if

Other Plain if Example

if_else

if else if

Nested if

Ternary if

Summary

Key Terms

Exercises

References.

Chapter 6: Loops

Loops

for loops

while Loop

Boolean Conditions in while Loops

Endless while Loop

do while Loops

Enhanced for Loops (Summary)

Switch Command

Limitations of the Switch Command

switch Command Using int as Input

switch Command Using char as Input

Summary

Key Terms

Exercises

References

Chapter 7: Data Structures – Arrays

Data Structures

Arrays

One Dimension Array
Declaring/Creating One Dimension Arrays

Allocating Space to Declared Arrays:

Declare and Allocate at the Same Time:

Create, Allocate and Load Data into Arrays:

Load Data to a Declared Array

Printing all Values Inside this Array

Multi Dimensional Arrays

Two Dimension Arrays

Two Dimensional int Arrays

Two Dimensional String Arrays (Using Array’s Length)

Three Multidimensional Arrays

Parallel Arrays.

Enhanced for Loops

String Tokenizer

Summary

Key Terms

Exercises

References

Chapter 8: Data Structures – ArrayList

ArrayList

IteratorUsing Iterator in an ArrayList

Copying Arrays into an ArrayList Modify and Back

Object Data Types

Summary

Key Terms

Exercises

References

Chapter 9: Data Structures – Files

What is a File?

What is a Record?

Catching Errors Exceptions In Data Files

Text Files

Text Files Using:

FileWriter, PrintWriter, FileReader and BufferedReader

Text Files Using the File Class

Exceptions Handling

Text Files Using the Formatter Class
Text Files Using the Scanner Class

Large Files. Writing and Reading

Printing Numbers Using Decimal Format

Binary Files

Summary

Key Terms

Exercises

References

Chapter 10: External Classes,

Methods, This, Constructors

External Classes

Final Variables

toString

What is ‘this’?

What is a Constructor?

Simple Constructors

What is a Variable-Length Argument List in Methods?

Object Data Types

What is the Meaning of main( String arg[] )?

Summary

Key Terms

Exercises

References

Chapter 11: GUI Simple Applications

What is GUI (Graphical User Interface)?

What are Dialog Boxes?

Message Dialog Boxes

Input Dialog Boxes

What is a Frame?

Creating a Frame

Creating a Small Frame

Creating a Full Size Frame

Summary

Key Terms

Exercises

References

Chapter 12: Sorting and Recursion

What is Sorting?

Swap - Placing Data in Order

Bubble Sort

Recursion

Summary

Key Terms

Exercises

References

Chapter 13: Inheritance and Polymorphism

What is Inheritance?

Polymorphism

Final Methods

Final Classes

Protected Classes Methods and Variables

Summary

Key Terms

Exercises

References

Chapter 14: Interfaces and Abstraction

What is an Interface?

Data Abstraction

Data Abstraction vs Interfaces

Summary

Key Terms

Exercises

References

Chapter 15: Data Structures Implementations

Linked List

Overloading

Stacks

Queue

Summary

Key Terms
Exercises

References

Chapter 16: Complex Programming

Caller Program

Abstract Classes

Classes Inside Classes

Interfaces

Extends/Inhereting

Summary

Key Terms

Exercises

References

Chapter 17: Miscellaneous

Generic Methods

Introduction to Java Collection Interface

Overriding equals and toString methods

How to Reduce Typing

ASCII Codes Program

Javadoc Summary

Key Terms

Exercises

References

Glossary

Index

Michael Robinson