Android is Google’s software stack for mobile devices. This stack consists of applications
(or apps as they are commonly called), a virtual machine (software-based processor and associated
environment) in which apps run, middleware (software that sits on top of the operating system and
provides various services to the virtual machine and its apps), and a Linux-based operating system.
Android apps are written in Java and use various Java Application Program Interfaces (APIs).
Because you will want to write your own apps but may be unfamiliar with the Java language and
these APIs, this book teaches you about Java as a first step into app development. It provides you
with the fundamentals of the Java language and Java APIs that are useful when developing apps.
Note This book illustrates Java concepts via non-Android Java applications. It’s easier for beginners
to grasp these applications than corresponding Android apps.
An API refers to an interface that an application’s code uses to communicate with other code, which is
typically stored in some kind of software library. For more information on this term, check out Wikipedia’s
“Application programming interface” topic (http://en.wikipedia.org/wiki/Application_
This chapter sets the stage for teaching you the essential Java concepts that you need to
understand before you embark on your Android app development career. I first answer the “What is
Java?” question. I next show you how to install the Java SE Development Kit (JDK), and introduce
you to JDK tools for compiling and running Java applications.
After showing you how to install and use the open source Eclipse IDE (Integrated Development
Environment) so that you can more easily (and more quickly) develop Java applications (and,
eventually, Android apps), I provide you with a high-level overview of various Java APIs that you can
access from your Java applications and Android apps. In subsequent chapters, you’ll explore these
and other useful APIs in greater detail.