Java Reference
In-Depth Information
1
Expressions, Variables and Assignments
1.1 Introduction
In this chapter, we cover the very basics lying at the heart of every Java
program. That is, we introduce the minimalist program that forms the skeleton
common to all programs, and explain the programming cycle of writing,
compiling, editing and executing code. We provide an overview of the key
concepts of typed language and describe the primitive types of Java. Finally,
we present the syntax of arithmetic operators and give details on basic
input/output operations for writing our first programs.
1.2 My first Java programs
1.2.1 A minimalist program
When learning any new programming language, it is traditional to start by
first looking at what programmers call the basic skeleton of any program.
This skeleton lets them gain some understanding of the language syntax and
presents the necessary wrapping code. First programs look often mystic, if not
weird, since they reveal at once some of the key syntax components of the
programming language. In its simplest form, consider the following “shortest”
Java program:
 
Search WWH ::




Custom Search