Java Reference
In-Depth Information
14.
Programs and data are permanently stored on
storage devices
and are moved to mem-
ory when the computer actually uses them.
15.
The
machine language
is a set of primitive instructions built into every computer.
16.
Assembly language
is a
low-level programming language
in which a mnemonic is
used to represent each machine-language instruction.
17.
High-level languages
are English-like and easy to learn and program.
18.
A program written in a high-level language is called a
source program.
19.
A
compiler
is a software program that translates the source program into a
machine-
language program.
20.
The
operating system (OS)
is a program that manages and controls a computer's
activities.
21.
Java is platform independent, meaning that you can write a program once and run it
on any computer.
22.
Java programs can be embedded in HTML pages and downloaded by Web browsers
to bring live animation and interaction to Web clients.
23.
The Java source file name must match the public class name in the program. Java
source code files must end with the
.java
extension.
24.
Every class is compiled into a separate bytecode file that has the same name as the
class and ends with the
.class
extension.
25.
To compile a Java source-code file from the command line, use the
javac
command.
26.
To run a Java class from the command line, use the
java
command.
27.
Every Java program is a set of class definitions. The keyword
class
introduces a
class definition. The contents of the class are included in a
block.
28.
A block begins with an opening brace (
{
) and ends with a closing brace (
}
).
29.
Methods are contained in a class. To run a Java program, the program must have a
main
method. The
main
method is the entry point where the program starts when it
is executed.
30.
Every
statement
in Java ends with a semicolon (
;
), known as the
statement terminator.
31.
Reserved words,
or
keywords,
have a specific meaning to the compiler and cannot be
used for other purposes in the program.
32.
In Java, comments are preceded by two slashes (
//
) on a line, called a
line comment,
or enclosed between
/*
and
*/
on one or several lines, called a
block comment
or
paragraph comment
. Comments are ignored by the compiler.
33.
Java source programs are case sensitive.