Chapter 1
Chapter 1
Chapter 1
History of Java
Characteristics of Java
• Simple
• Object-Oriented
• Distributed
• Interpreted
• Robust
• Secure
• Architecture-Neutral
READ! :
• Portable
Java Characteristics
• High Performance
(http://www.cs.armstrong.edu/liang/intro6e/JavaCharacteris
• Multithreaded
tics.pdf)
• Dynamic
Types of Java
• Java Application
o Is a standalone programs.
o Can be executed from any computer with a Java interpreter
• Java Applet
o Is special kind of Java Programs that can run directly from Java-compatible Web
browser. (Will be introduced in Chapter 10)
Java Environments
• Language Specification
- Computer languages have strictly rules of usage. The Computer will be unable to
understand it if you do not follow the rules when writing the program
• Development Tools
- Oracle (**SUN acquisition by Oracle) releases each version of Java with a Java
Development Kit (JDK) or Software Development Kit (SDK).
- It is a primitive command-line tool set that includes software libraries, a
compiler, an interpreter for running, and an applet viewer for testing applets,
as well as other useful utilities.
Besides JDK, there are many Java IDE or development packages on the
market today.
These environments consist of a text editor, compiler, debugger and
other utilities integrated into a package with a single set of menu.
.java File
HOW
You have to create your program and compile it before it can be executed.
You have to save the Java source code as java extension ( .java ).
The file name must same as the class name.
Then you compile it. If your program has error(s), the error has to be
corrected before the compiler can translate the source code.
The compiling process is to translate the Java source code to Java byte code
and generates the dot class (.class ) file.
To execute a Java program is to run the program’s byte code.
Byte code instructions are NOT machine language and therefore cannot be
directly executed by the CPU.
The Java Virtual Machine (JVM) executes the byte code instructions.
JVM is a program that simulates a computer whose language is Java byte
code.