Lecture 2 OOPJ

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Why the name Java ?

JAMES
GOSLING VectorSock Vetosttech eovas6931

Initially java was called oak.


Why the nae
In 1990,sun microsystems Inc.(US)has conceived a project to develop software for consumer
electronics that could be controlled by a remote.This project was called stealth project but later its
name was changed to green project

In january of 1991,James Gosling and other team members discuss this project.gosling thought c
andc++ Could be used to develop the project.but problem he faced with them is that theywere
system dependent and could not be used on various processors, which the electronic devices
might use.
So he started developing anew language, which was completely system independent.this
language was initially called oak. James Goslingnamed the language "Oak" because of an oak
tree that stood outside his office window at Sun Microsystems. The tree was a source of
inspiration and a familiar sight during the development of the language.
However, when it was discovered that the name "Oak" was already registered by some other
company, ,later it was changed to java.
Why the name java?james goslingand his team memberswere consuming a lot of coffee while
developing this language .they felt that they were able to develop abetter language because of
the good quality coffee they consumed.so the coffee had its own role in developing this language
and good quality coffee was exported to the entire world from a place called 'java island'.hence
they fixed the name of the place for the language as java andthe symbol for java language is
coffee Cup and saucer.
Features of Java
. Java is asystem independent language
. Simple
. Object oriented
. Distributed
.Robust
. Secure
"System independence
.Portability
. Interpreted
. Highperformance
Features ofave
Simple
->all the difficult concepts of c and c++ have been omitted in java.
>concept of pointers has been completely eliminated.
->programmer who knows cor c++ will find java already familiar.

Object-oriented
->javais an object oriented programming language.This means java
programs use objects and classes.
Robust
Features of Java
Robust means strong.
Java programs are strong and they donot crash easily like a cor c++
program.there are two reasons:
Firstly java has got excellent inbuilt exception handling features.
Note:an exception is an error that occursat run time.if an exception
Occurs the program terminates abruptly giving rise to problems like loss
of data.overcoming such problems is called exception handling.
Ifexception occurs in java program ,no harm will happen.
Another reason,why java is robust lies in its memory mangement
features.
Most of the c and ct+ programs crash in the middle because of not
allocating sufficient memory or forgetting the memory to be freed in a
program.
Such problems will not occur in java because the user need not allocate
or deallocate the memory in java.everything will be taken care of by JVM
only.e.g ,JVM will allocate the necessary memory needed by ajava
Featuresolb
Security problem for data on Internet along with their solutions:
Eavesdropping:
This means reading others data illegally on Internet.
e.g,opening others emails and reading them comes into this category.
Solution for this problem is encryption and decryption
Converting the data into unreadable format is called encryption
Getting back the original data from the encrypted format is called
decryption.
Encryption and decryption can be done using java technology
Tampering:
>this is anotherproblem on internet.
’not only reading others data ,but also modifying it is called
tampering.
’encryption and decryption is the solution for this problem
also.
Features of Java
Impersonation:
Many peoplehide their original identity and act as
somebodyelse to make transactions.
Solution for this problem is digital signature.
Digital signature is a file that contains personal information in
an encrypted format. storing the personal information in digital
signature and sending this information along with the mail
assures the receiver of the identity of the sender.
Digital signature can be created using java technology.
Virus:
Virus represents a program that can cause harm to the data,software and
hardware of a computer system.
|Viruses spreadwith .exe,.doc, gif,jpg,audio and video files.
Viruscannot spread with .txt file(the file created in notepad)
In java we create .class files which are similar to .txt files and there is no
Lehonco of icue offootina thaso filos
Features otev
JVM can verify its presence before running the program,if
found can abort the .class files's execution.
Note:java can eliminate the above securityproblem.

Secure:
Security like eavesdropping,tampering,impersonation and virus threats
can be eliminated or minimized by using java on internet.
Features oinw
System independence:
Java'sbyte code is not machine dependent.it can be run on
any machine with any processor and any operating system

Portability:
Ifa program yields the same result,on every machine,then that program
is called portable.
Java programs are portable
Features ol
Interpreted:
Java programs are compiled to generate the bytecode
This bytecode can be downloaded and interpreted by the interpreter in
JVM.

High performance:
The problem with interpreter inside the JVM is that it is slow.
Because of thisjava programs used to run slow.
Toovercome this problem along with interpreter java soft people
introduced JIT(Just in Time)compiler, which enhances the speed of
execution.
So,now in JVM both interpreter and JIT compiler work together to run the
program.
Featureso p
Multithreaded:JVM uses multiple threads to execute different blocks of
code.creating multiple threads is called multithreaded.

Dynamic:java uses the concept of applet.


ne.
tual
uction Tor Java he
takingthe O
Machine
VirtualJava program, levelsof
Scalabilitù:
moving But multithreaded'. SVM
Multithreaded:
execution.
Dynamic: Jaya JavaSoft
when is
that uses
and compact
Virtual which resources
from people
canclass . James
stretching, several So
Before platformJavá
be now
is and A
ecuted file(JVM) is
the Gosling ihe eParooblo. threads have
thread in
Machine
and dynamically platform JVM,
the
developneht introduced
heartthe embedded represents
onverting viewers
demonstrated canbe
to both
by execute
the
independent.
interpreter
entireof interacting were of
implemented on
a JIT
oproce mainframe
Java, devices
o todifferent
individual
processan
each (Just
dumbstruck.
an
only
byte Java ot and
animated blocks In
ssor. JITTime)
Sterehed program
structioncode static
program compiler
Figure of
This
on text code. compiler,
atomic range
wide
2.2
execution
Internet.
animation computers.
used execute to
Creating work
shows molecule to which
Introduction
together
into be
computers of
process. is
It was
displayedpossible
This is multiple
the a
enhances
the group
ecture donewhere to
machine run
using threads
in to
the the varying
withstatements. of the the
responsible Java
language an
rays program.
of browser.ON causebe is speed
Java applet called
are 11
of

You might also like