History & Development of Java
History & Development of Java
History & Development of Java
DEVELOPMENT OF JAVA
James Gosling
James A. Gosling. (born on May 19, 1955, near
Calgary.
Alberta, Canada) is a famous software developer. In 1977, he
completed his graduation as a B.Sc. in Computer Science from
the University of Calgary. In 1981, he was honoured a Ph.D in
Computer Science from Carnegie Mellon He University.
developed many compilers and mail systems. Since 1984, he has
been associating with Sun Micro Systems and developed Java
programming language in 1991. He was also elected to the
United States National Academy of Engineering for this
achievement. In 2007, he was made an Officer of the "Order of
Canada", which is Canada's highest civilian honour.
Java is an object oriented programming
language developed primarily by James
Gosling and colleagues at Sun Micro Systems. This language was initially called Oak
(named after the Oak trees outside Gosling's office).
In 1991. the Sun Micro Systems (Broomfield, Colorado,
USA) developed a complete
language as a part of research work to develop software for consumer electronics. It was
developed as a full-fledged programming language in which one can accomplish the same
sort of tasks and solve the similar problems like other programming languages such as
BASIC, C++ etc. The platform independence is one of the most significant advantage that
JAVA has over other languages. It is the capability of
moving easily from one computer
system to another.
JAVA, being an object oriented programming language encapsulates many features of
C++. Originally, JAVA was designed to execute applets, downloaded while Web
browsing. But gradually, the language has been gaining wide acceptance as a
programming language, very often replacing C or C++.
compiler.
As President finishes a sentence, it is immediately converted and spoken by the
translator in Hindi or English. In this system the translation is sentence wise. This
process of conversion of the language is called Interpretation and the translator is
termed as interpreter.
All high level languages need to be converted into machine code (binary code) so that
the computer understands the program after taking the required inputs. It processes the
program and then shows the desired result if it is error free, otherwise the errors are to
be corrected to execute the program
successfully.
The conversion of high-level language (source code) to machine level language
(binary code) can be done in two possible ways. It can be done either
or an Interpreter. by using a Compiler
The software, by which the conversion of the
high level instructions is performed ine
by line to machine level language, is known as an
any line, further execution stops till it is
Interpreter. If an error is found on
corrected. This process of error correction is
much easier but the program takes longer
time to execute
successfully.
Source Code Compiler/ Machine
Interpreter Code
Application Program System Program
Object Code
However, if all the
instructions are converted to machine level
together, then the software is known as language This
all the erors are listed at Once ad
Windows
98
Java Java
Source Code Compiler Byte Code Java Unix
Interpreter Uni
System
JVM
OS-2
System
Java machine code varies for different
platforms like Windows, UNIX, OS-2 etc.
Hence, Java Interpreter converts byte code to the machine code for
JVM acts
concerning platform.
virtual processor, which processe the
as a
byte code to machine code
instructions for various platforms. That is why it is called
Java Virtual Machine.
Thus, the Java program uses compiler as well as interpreter both.
in Java Programming
Comment Statements the logic applied in a program
to understand
becomes difficult for
a user
Sometimes it the programmer keeps
has developed it. In such cases.
other person This can be made
particularly when any in different steps.
and action being taken
mentioning the purpose statement in the program.
comment
possible only by applying However. users are
in Java programming.
give a comment
There are three ways to Java programming.
wherever necessary while writing
expected to give comments
1.
used for multi line
comment
2. /* comments to be written */ :
comment */
3. /** documenting
class first
Documenting Comment
This type of comment statement
can be
brief documentation along with his applied when a
programmer needs to include
program.
class first
Note: When a message is to be displayed along with a variable, then they are to
be separated with +" (plus) sign.
Introduction to BlueJ
environment from Monash University, Australia. It is a wind
w based
BlueJ is a free Java
Kit (JDK ). It requires to install JDK 1.3 versionsed
on or more
platform for Java Development
also get more intormation about BlueJ throuore
before installing Blue). We can ugh the
website www.bluei.monash.edu.
Blue) can be freely downloaded from the
www.bluei.org.
Features of BlueJ
.The compilation as well as execution process IS comparatively easier than
Java
(JDKI.3).
It is menu driven approach. Hence. it makes the system easier for the userto
Work on
windows platform.
.To inculcate good programming skills, a sample program appears on the screen as co
on
as the user defines a class.
After compilation, it shows the error, if any, present in the program. Otherwise t
displays the message "No syntax error".
You can also down load Java program from Internet.
a
BlueJ
Monash University
University of Southern
Denmark
Shortcut
to bluej Version 1.2.2
You can see project option on menu bar of BlueJ windows, which enables you to
create a directory. In order to create a directory, click on project and then select new
project option.
BlueJ
Project Edit Tools View
Help
New Class
Step-I
Compile
View
Uses
Inheritance
BlueJ
roject Ed Tools Vlew
OX
Nelp
w Project...
Open Project... Ctrl-o
Open Recent
Open Non BlueJ.
Close Ctr-W
Step-II
Save Cir-S
Save As.
Import..
Export.
Page Setu..
Print.. Cr-P
Quit Ctr-a
21
the space
provided in theEile
the name in
is created
after typing with the Project icon, N
Now
project/directory screen appears
A The
click create.
Name (say, Learning) and
button.
click on New Class
Help
aBlueJ Wiew
Project Edit Tools
New Project
Look In: Step-III
Abhinav
AKASH
Asrani
Blue
convent
Dey constructor
Dey Inheritence
dk
DKClass
Create
Flle name: Learning
Cancel
Flles ofype: All Files (-)
BlueJ- Learning
Project Edlt Tools View Help
New Class
Step-IV
Compile
View
Uses
Inheritance
RSEEgzEEEHISEgggE SggIEEggggggggzsEB233355SESSeeesrsesse
Write Class Name in the space provided (say, Welcome) and click OK. A new window
appears with the folder named Welcome.
BlueJ -
Class Type
OClass
O Abstract Class
OInterface
O Applet
OApplet
O Unit Test
Ok|Cancel
BlueJ- Learning
Project Edit Tools View Heip
New Class
Welcome
Step-VI
Compile
View
Uses
Inheritance
Now, just double click the folder Welcome to open the class Welcome. A sample
structure of the class appears on the screen.
23
Welcome
tass B Teets epties
mplementation
author
euthor nmber or
(a varaion mber or a date date
pulic claes Molc
om
ewAple below with your
variablee replace the
Anstance
/private int n:
poblie Melome ()
A n i t i a l i s e instance variables
AD e p l e of a
Welcomne
Cless BR Tools Outons
Compile Undo Cut CoPY Paste Close Irnplernentstion
/**
Write a description of clase Helcome bare. Step-VIII
dauthor (your nane)
eauthor (a version mumber or a date)
Pablic class Welcom
blie Welcame ()
eparan Y
ereturn the ple paraster for
tora a nothod
nothod
and
changeo
Now, you start
writing your program as illustrated below.
which displays the message: "Class Compile your
Otherwise, debug and recompile the compiled, no syntax errors" (if noprogram
program unless it is error).
error free.
Welcome
Class BilR Toois Options
BlueJ- Learning
Project Edit Tools View
Help
New Classs
Welcomee
new Wecome() Step-X
VOlo rmainarg
Compile Open Editor
Compile
Remove
View
Uses
Inheritance
BlueJ-1Learning
Prolect EiR Teols View Help
View
Welcome.main( |0
Uses Ok Cancel
Inheritance
Note In case
of using input statement
from the user
in the
program, the system asks the
thus obtained. (discussed in the
Chapter 5). value
The
output of the
program is
Modification in Java
If
you want to Programming
Welcome) modify
(say the
and double present program, which is
appears on the click the left on
Bluej
It must be
screen where you can
button of the platform,
mouse. Thus, select the class
the output.
noted that the modify your the desired
program has to be program. progranm
recompiled after making
any change to get
26
pifferences between JDK 1.3 and
Bluel
JDK 1.3
BlueJ
1.DOS based platform.
. Windows based platform.
2. Uses DOS command for
compilation 2. Uses menu driven approach
for compilation.
3. Sample program does not appear 3.
Sample program appears on the
Screen.
4. Provides interaction to the user. 4. It provides user-friendly environment.
Exercise
Multiple choice questions
I. Tick () the correct answer:
29