You are on page 1of 3

FULLNAME:________________________________________ GRADE&SECTION: _______________________

LESSON 1: INTRODUCTION TO JAVA

What is Java?

Java is an object-oriented language originally developed by Sun


Microsystems, Inc. and released in 1995 as a core component of Sun
Microsystems' Java Platform.Java is also classified as high level
programming language where it still needs to be compiled and to be
converted to a format that the computer can understand.

The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-
level facilities. Java source code files (files with a .java extension) are compiled into a format called
bytecode (files with a .class extension) that can run on any Java Virtual machine (JVM) regardless of
computer Architecture.

History of Java

In January of 1991, Bill Joy, James Gosling, Mike Sheradin, Patrick Naughton (formerly the project
leader of Sun's Open Windows user environment), and several other individuals met in Aspen, Colorado
for the first time to discuss the ideas for the Stealth Project. The goal of the Stealth Project was
to do research in the area of application of computers in the consumer electronics market. The vision
of the project was to develop "smart" consumer electronic devices that could all be centrally controlled
and programmed from a handheld-remote-control-like device. According to Gosling, "the goal was to
build a system that would let us do a large, distributed, heterogeneous network of consumer electronic
devices all talking to each other." With this goal in mind, the stealth group began work.

Members of the Stealth Project, which later became known as the Green Project, divided the
tasks amongst themselves. Mike Sheradin was to focus on business development, Patrick Naughton
was to begin work on the graphics system, and James Gosling was to identify the proper programming
language for the project. Soon after was convinced that C++ was inadequate for this particular
project. James Gosling extensions and modifications to C++ (also known as C++ ++ --), were the first
steps towards the development of an independent language that would fit the project objectives. He
named the language "Oak" while staring at an oak tree outside his office window! The name "Oak" was
later dismissed due to a patent search which determined that the name was copyrighted and used
for another programming language. According to Gosling, "the Java development team discovered that
Oak was the name of a programming language that predated Sun's language, so another name had to
be chosen.""It's surprisingly difficult to find a good name for a programming language, as the team
discovered after many hours of brainstorming. Finally, inspiration struck one day during a trip to the
local coffee shop name JAVA". Others have speculated that the name Java came from several
individuals involved in the project: James Gosling, Arthur Van Hoff, and Andy Bechtolsheim.

Key Benefits of Java

PREPARED BY: MS. APRIL VALENCIANO ASILO Page 1


FULLNAME:________________________________________ GRADE&SECTION: _______________________

LESSON 1: INTRODUCTION TO JAVA

 Write Once, Run Anywhere (WORA)


You only have to write your application once--for the Java platform--and then you'll be able to
run it anywhere.

 Security
The Java platform allows users to download untrusted code over a network and run it in a secure
environment in which it cannot do any harm:

 Network-centric Programming
Java makes it unbelievably easy to work with resources across a network and to create network-
based applications using client/server or multitier architectures.

 Dynamic, Extensible Programs


An application can decide as it is running what classes it needs and can load them when it needs
them. It also means that a program can dynamically extend itself by loading the classes it needs
to expand its functionality.

 Internationalization
Java uses 16-bit Unicode characters that represent the phonetic alphabets and ideographic
character sets of the entire world.

 Performance
The Java Virtual Machine runs a Java program by interpreting the byte-code instructions. This
architecture means that Java programs are faster than programs or scripts written in purely
interpreted languages, but they are typically slower than C and C++ programs compiled to native
machine language. Keep in mind, however, that although Java programs are compiled to byte code,
not the entire Java platform is implemented with interpreted byte codes. For efficiency,
computationally intensive portions of the Java platformare implemented using native machine
code.

 Programmer Efficiency and Time-to-Market


Java is an elegant language combined with a powerful and well-designed set of APIs. Because Java
is a simple and elegant language with a well-designed, intuitive set of APIs, programmers write
better code with fewer bugs than for other platforms, again reducing development time.

Features of Java

 Platform Independence
Programs developed with Java can run on any computer system with no changes.

 Object Oriented
Object oriented throughout - no coding outside of class definitions, including main().

 Compiler/Interpreter Combo
Code is compiled to bytecodes that are interpreted by a Java virtual machines (JVM).

 Robust
Exception handling built-in, strong type checking

 Several dangerous features of C & C++ eliminated:


No memory pointers;No preprocessor ; Array index limit checking

 Automatic Memory Management


Automatic garbage collection - Memory management is handled by JVM.

PREPARED BY: MS. APRIL VALENCIANO ASILO Page 2


FULLNAME:________________________________________ GRADE&SECTION: _______________________

LESSON 1: INTRODUCTION TO JAVA

 Security
No memory pointers; Programs runs inside the virtual machine sandbox.

 Dynamic Binding
The linking of data and methods to where they are located is done at run-time. New classes can
be loaded while a program is running. Even if libraries are recompiled, there is no need to
recompile code that uses classes in those libraries.

 Good Performance
Advanced virtual machines with adaptive and just-in-time compilation and other techniques now
typically provide performance up to 50% to 100% the speed of C++ programs.

 Threading
Lightweight processes, called threads, can easily be spun off to perform multiprocessing. It
can take advantage of multiprocessors thus it is great for multimedia displays.

 Built-in Networking
Java was designed with networking in mind and comes with many classes to develop
sophisticated Internet communications.

PREPARED BY: MS. APRIL VALENCIANO ASILO Page 3

You might also like