Java Programming
This book is an introduction to programming in Oracle’s Java™ programming language, a widely used programming language and software platform. This book serves as a comprehensive guide, complete with a series of tutorials to help users better understand the many ways one can program in Java. In its entirety, this book is meant to be both an introductory guide and a useful reference on Java and related technologies. As is the nature of this book, the content within the book is continuously being updated and revised. With every chapter within this book, the complexity of the context increases, building up on lessons learnt in the previous chapters. Beginners should therefore start from the beginning and proceed in a sequence throughout the material of the book.
If you are not familiar with Object Oriented Programming, you should first read the book Object Oriented Programming. Other special purpose books on Java, such as Java Enterprise Edition programming, Java Persistence, or Java Swing programming, with more details, would complement this book nicely.
Contents
Overview
- About this book
- History of Java
- Overview of the Java programming language
- The Java platform (JRE & JDK)
Getting started
- Installing Java on Your Computer
- Compiling programs
- Running Java programs
- Understanding a Java program
- Java IDEs
Language fundamentals
- Statements
- Conditional blocks
- Loop blocks
- Boolean expressions
- Variables
- Primitive Types
- Arithmetic expressions
- Literals
- Methods
- String
- Objects
- Keywords
- Packages
- Scope
- Arrays
- Mathematical functions
- Large numbers
- Random numbers
- Unicode
- Comments
Classes and objects
- Defining classes
- Creating objects
- Interfaces
- Using static members
- Destroying objects
- Overloading methods and constructors
- Class Loading
- Nested classes
- Generics
Collections
Exceptions
- Throwing and catching exceptions
- Stack trace
- Checked exceptions
- Unchecked exceptions
- Preventing
NullPointerException
- Chained exceptions(Nesting Exceptions)
Concurrent Programming
- Threads and Runnables
- Basic Synchronization
- Client Server Programming
- Remote Method Invocation(RMI)
- Enterprise JavaBean Programming
- Jini-Java Spaces Programming
Annotations
- Javadoc
- Introduction to Annotation
- Creating custom annotations
- Meta-annotations
- Helping the compiler
- Processing annotations at runtime
- A few examples of annotations
- A glossary of built-in annotations in Java
Designing user interfaces
Advanced topics
- Networking
- Database programming
- Reflection
- Libraries, extensions and frameworks
- 3D programming
- Java Native Interface
- Invoking C