Java Reference
In-Depth Information
method with a version that calls the other methods in the following new order. What
output would it produce?
public static void main(String[] args) {
drawCone();
drawCone();
drawRocket();
drawX();
drawRocket();
drawDiamond();
drawBox();
drawDiamond();
drawX();
drawRocket();
}
Chapter Summary
Computers execute sets of instructions called programs.
Computers store information internally as sequences of 0s
and 1s (binary numbers).
environment, but the same three-step process is always
involved:
1. Type in a program as a Java class.
2. Compile the program file.
3. Run the compiled version of the program.
Programming and computer science deal with algorithms,
which are step-by-step descriptions for solving problems.
Java uses a command called System.out.println to
display text on the console screen.
Java is a modern object-oriented programming language
developed by Sun Microsystems that has a large set of
libraries you can use to build complex programs.
Written words in a program can take different meanings.
Keywords are special reserved words that are part of the
language. Identifiers are words defined by the programmer
to name entities in the program. Words can also be put into
strings, which are pieces of text that can be printed to the
console.
A program is translated from text into computer instruc-
tions by another program called a compiler. Java's com-
piler turns Java programs into a special format called Java
bytecodes, which are executed using a special program
called the Java Runtime Environment.
Java programs that use proper spacing and layout are more
readable to programmers. Readability is also improved by
writing notes called comments inside the program.
Java programmers typically complete their work using an
editor called an Integrated Development Environment
(IDE). The commands may vary from environment to
 
 
Search WWH ::




Custom Search