1. INTRODUCTION TO JAVA PROGRAMMING | Page 1 of 3
ST. STEPHEN’S HIGH SCHOOL
COMPUTER DEPARTMENT
STRUCTURED PROGRAMMING USING JAVA
S.Y. 2014-2015
JAVA HISTORY
SUN (Stanford University Networks) Microsystems funded an internal corporate research project code-
named Green in 1991
The project resulted in the development of a C and C++ based language which its creator, James Gosling,
called the Oak after an oak tree outside his window at Sun
When a group of Sun people visited a local coffee shop place, the name Java was suggested and it stuck
JAVA
is a full-featured programming language designed to add greater flexibility and functionality to pages on the
World Wide Web
Java is a complex language, requiring knowledge of C++ programming, classes and other aspects of object-
oriented software design
It also requires a software development kit and special compiler
Java program consists of pieces called Classes
Java handles the 2 fundamental problems most often associated with downloading executable files:
1. Security – with Java, it is possible to safely download applets without fear of viral infection or malicious
intent
2. Portability – Java programs can be dynamically downloaded to all various types of platforms connected to
the Internet, some means of generating portable executable code is needed. Java accomplishes this through
its Java bytecode.
Java bytecodes, the platform-independent code, which is a highly optimized set of instruction
designed to be executed by the Java run-time system
Java bytecodes help make “write once, run anywhere” possible
You can compile the Java program into bytecodes on any platform that has a Java compiler.
These can be run on any Java Virtual machine implementation
THE JAVA PLATFORM
A platform is the hardware or software environment in which a program runs. The Java platform differs from most
other platforms. It is a software-only platform that runs on top of other, hardware-based platform
The Java platform has two components:
1. The Java Virtual Machine (Java VM)
The Java VM is the base for the Java platform and is ported onto various hardware-based platforms.
The main examples of this are Microsoft Internet Explorer and Netscape Navigator
2. The Java Applications Programming Interface (Java API)
The Java API is a large collection of ready-made software components that provide many useful
capabilities, such as graphical user interface (GUI) widgets
The Java API is grouped into libraries (packages) of related components
Java Class Library of Java Applications Programming Interface (Java API) – packages used in Java
classes
2. INTRODUCTION TO JAVA PROGRAMMING | Page 2 of 3
ST. STEPHEN’S HIGH SCHOOL
COMPUTER DEPARTMENT
STRUCTURED PROGRAMMING USING JAVA
S.Y. 2014-2015
JAVA API PACKAGES
PACKAGE DESCRIPTION
java.applet The Java Applet Package
This package contains the Applet class and several
interfaces that enable the creation of applets,
interaction of applets with the browser and playing
audio clips. In Java 2, class javax. swing.JApplet is used
to define an applet that uses the Swing GUI
components
java.awt The Java Abstract Windowing Toolkit Package
This package contains the classes and interfaces
required to create and manipulate graphical user
interfaces in Java. In Java 2, these classes can still be
used, but the Swing GUI components of the javax.swing
packages are often used instead.
java.awt.event The Java Abstract windowing Toolkit Event Package
This package contains classes and interfaces that
enable event handling for GUI components in both the
java.awt and javax.swing packages
java.io The Java Input/Output Package
This package contains classes that enable programs to
input and output data
java.lang The Java Language Package
This package contains classes and interfaces required
by many Java programs and is automatically imported
by the compiler into all programs
java.net The Java Networking Package
This package contains classes and enable programs to
communicate via networks
java.text The Java Text Package
This package contains classes and interfaces that
enable a Java program to manipulate numbers, dates,
characters, and strings. It provides many of Java’s
internationalization capabilities
3. INTRODUCTION TO JAVA PROGRAMMING | Page 3 of 3
ST. STEPHEN’S HIGH SCHOOL
COMPUTER DEPARTMENT
STRUCTURED PROGRAMMING USING JAVA
S.Y. 2014-2015
java.util The Java Utilities Package
This package contains utility classes and interfaces,
such as date and time manipulations, random-number
processing capabilities, storing and processing large
amounts of data, breaking strings into smaller pieces
called tokens and other capabilities.
javax.swing The Java Swing GUI Components Package
This package contains classes and interfaces for Java’s
Swing GUI components that provide support for
portable GUIs.
javax.swing.event The Java Swing Event Package
This package contains classes and interfaces that
enable event handling for GUI components in the
javax.swing package