Introduction to Java Programming
Introduction to Java Programming
Introduction to Java Programming
After the name OAK, the team decided to give a new name to it
and the suggested words were Silk, Jolt, revolutionary, DNA,
dynamic, etc. These all names were easy to spell and fun to say,
but they all wanted the name to reflect the essence of technology.
In accordance with James Gosling, Java the among the top
names along with Silk, and since java was a unique name so
most of them preferred it.
Java is the name of an island in Indonesia where the first
coffee(named java coffee) was produced. And this name was
chosen by James Gosling while having coffee near his office.
Note that Java is just a name, not an acronym.
THE JAVA
BUZZWORDS/FEATURES
• Simple
• Secure
• Portable
• Object-oriented
• Robust
• Multithreaded
• Architecture-neutral
• Interpreted
• High performance
• Distributed
• Dynamic
JAVA PROGRAMMING
ENVIRONMENT
Java is a recently developed, concurrent, class-based,
object-oriented programming and runtime
environment, consisting of:
- A programming language
- An API specification
- A virtual machine specification
HOW JAVA WORKS
• Java's platform independence is achieved by
the use of the Java Virtual Machine
• A Java program consists of one or more files
with a .java extension
• When a Java program is compiled the .java
files are fed to a compiler which produces a
.class file for each .java file
• The .class file contains Java bytecode.
• Bytecode is like machine language, but it is
intended for the Java Virtual Machine not a
specific chip such as a Pentium or PowerPC
chip
CREATING, COMPILING, AND
RUNNING PROGRAMS
COMPILING JAVA
SOURCE CODE
You can port a source program to any machine
with appropriate compilers. The source program must
be recompiled, however, because the object program
can only run on a specific machine. Nowadays
computers are networked to work together. Java was
designed to run object programs on any platform. With
Java, you write the program once, and compile the
source program into a special type of object code,
known as bytecode. The bytecode can then run on any
computer with a Java Virtual Machine, as shown
below. Java Virtual Machine is a software that
interprets Java bytecode.