Sunteți pe pagina 1din 10

Introduction to JAVA and

History
Java is a 3
rd
Generation high-level object-oriented programming language developed by the
Sun Microsystems USA.
In ecember !""# $e% engineer o$ sun Microsystems started %or&ing on a project called
Stealth 'roject (a$ter it renamed to Green project %hose aim %as to develop a ne%
so$t%are $or their electronic device.
In January #$ !""!) *ill Joy) James Gosling and several other met in Aspen) +olorado to
discuss this project. i$$erent engineer ta&es di$$erent responsibilities o$ the project %here
as James Gosling too& the responsibility to identi$y the proper programming language $or
the project. James thought + and +,, that %as the most popular language $or those days
could be used to develop that project. *ut problem he $aced %ith them is that they %ere
system dependent) means the binary code that %ill generate $rom + or +,, is depend on the
system it get compiled and hence could not be used in di$$erent processor and -S %hich
electronic device might use.
So he started to develop a ne% programming language %hich %as completely system
independent.
A$ter %or&ing !. month on that project they develop a ne% programming language to
%hich Gosling called "Oak," (%hich %as selected essentially randomly by me/.
As the name -a& %as a proprietary name o$ some di$$erent +ompany) they had lots o$ email
debates about names) but nothing got resolved. 0hey ended up in the a%&%ard position
%here they have to change the name to java.
1 | P a g e
Mail By James Gosling to his colleague Jonathan Schwartz Date: August 24, 2007 :!":# $M Su%&ect: 'ow
was Ja(a name)*
Our marketing lead knew someone who was a "naming consultant" (I don't remember
his name, but he was great). We could neither aord the !rice nor the time o" a
con#entional !roduct naming !rocess. $e agreed to do something rather odd, but
eecti#e and %uick& he acted as a launch !ad at a meeting where about a do'en o" us
locked oursel#es in a room "or an a"ternoon. $e started asking us %uestions like "$ow
does this thing make (ou "eel)" (*+cited) "What else makes (ou "eel that wa()" We
ended u! with a board co#ered with essentiall( random words. ,hen he !ut us through
a sorting !rocess where we ended u! with a ranking o" the names. We ended u! with a
do'en name candidates and sent them o to the law(ers& the( worked down the list
until the( hit one that cleared their search. "-a#a" was the "ourth name on the list. ,he
.rst name on the list was "/ilk", which I hated but e#er(one else liked. 0( "a#orite was
"1(ric", the third one on the list, but it didn't !ass the law(ers test. I don't remember
what the other candidate names where.
/o, who named -a#a) 0arketing organi'ed the meeting, the consultant ran it, and a
whole !ile o" us did a lot o" (elling out o" random words.
+,m honestly not real sure who sai) -Ja(a- .irst, %ut +,m /retty sure it was Mar0 1//erman2
As the project gained momentum and started involving potential customers in the cable television
industry) the Green team came out $rom hiding) and again started %or&ing on this language to ma&e
it in the internet style.
1A$ter they reali2ed that there %asn3t a business in digital cable television) they had a group meeting
at 0he Inn at S4ua% +ree& near 5a&e 0ahoe. 6e had to $igure out %hat to do %ith this technology)
or %hat to do %ith our lives.1 0here) over the course o$ three days) James Gosling and his team7
%hy not the Internet81.
uring that period the internet very popular due to its centrali2ed data and (6-9A/ concept.
James and his team %or&ed hard on this and *y March 1995, sun Microsystems release the $irst
version o$ java i.e. jdk 1.0.
0he current java version is JAVA SE 7.0 update 6 released i 1! Au"ust #01#. Java 8 is expected in
summer 2013.
1990 $ Sun microSystem decided to develop special so$t%are that could be used to manipulate
+ostumer electronic devices and James Gosling started %or&ing on a ne% programming
language that could be implemented on it as plat$orm independently.
199# $ 0he team developed a ne% language call -a&.
199% $ 0he Gosling team came %ith an idea to develop a %eb applets using the ne% language
that could run on all type o$ computer connected to internet. *ecause those days internet
%as gaining in popularity in a rapid manner.
199! $ 0he team developed a ne% %eb bro%ser called &'tJa(a to locate and run applet program
on internet.
1995 $ -a& %as renamed to JA:A due to some legal slang. It is just a name not any acronyms.
i$$erent boo& have di$$erent narrative about the naming +onvention o$ JA:A.
)i**eret JAVA editi'
0he Java plat$orm reali2es the di$$ering challenges $acing developers and o$$ers the
choice o$ di$$erent Java technologies depending on the user3s needs. 0he Java plat$orm
editions contain additional Java A'Is $or creating di$$erent types o$ applications7
2 | P a g e
+lease Sa, "Ja(a"-
;ote that the ne% acronyms spell out "Ja(a"$ Java <<) Java S<) and Java M< = a need driven by
the brand3s increasing popularity %ith consumers. 1J<<1) 1JS<1) and 1JM<1 are not acceptable
acronyms as they have di$$erent meanings that are not associated %ith Java technology. >or
e?ample) a Google search on 1J<<1 returns topics unrelated to Java << along %ith di$$erent
in$ormation that is not related to Java.
Java Standard Edition
0he Java Standard <dition (Java S</ is $or building des&top applications and applets. 0hese
applications typically serve only a small number o$ users at one time. Java S< is a %idely used
plat$orm $or programming in the Java language. It is the Java 'lat$orm used to deploy portable
applications $or general use. In practical terms) Java S< consists o$ a virtual machine) %hich must
be used to run Java programs) together %ith a set o$ libraries (or 1pac&ages1/ needed to allo% the
use o$ $ile systems) net%or&s) graphical inter$aces) and so on) $rom %ithin those programs.
The other two environments (JME and JEE) are based on JE.
Ja(a Eterprise Editi'
0he Java <nterprise <dition (Java <</ is modi$ied $or more comple? applications to suit medium to
large businesses. 0ypically they %ill be server based applications $ocusing on serving the needs o$
lots users at one time. 0he Java plat$orm <nterprise <dition di$$ers $rom the Java Standard <dition
'lat$orm (JS</ in that it adds libraries %hich provide $unctionality to deploy $ault-tolerant)
distributed) multi-tier Java so$t%are) based largely on modular components running on an
application server. <specially it is used $or 6eb based applications.
Note: The Java EE contains many of the Java APIs found in the Java SE.
Ja(a Micr' Editi'
0he Java Micro <dition is $or applications used on mobile (e.g.) cell phone) 'A/ and embedded
devices (e.g.) 0: tuner bo?) printers/. Java 'lat$orm) Micro <dition) or Java M<) is a Java plat$orm
designed $or embedded systems (mobile devices are one &ind o$ such systems/ . 0arget devices
range $rom industrial controls to mobile phones (especially $eature phones/ and set-top bo?es.
3 | P a g e
JAVA
Programming
Language
Java SE
(Java Standard
Edition)
Java EE
(Java Enterprise
Edition)
Java ME
(Java Micro Edition)
Version of JAVA
J). 1.0 /Jauar, #%, 19960 /+odename Oak/
0he $irst stable version %as the J@ !.#.A. is called Ja(a 1
It is the $irst version that %as released by sun Microsystems in Jan AB) !""B.in this version many o$
the $unctionality %as same as +,,. ;o% not all the $eatures are present in current java.
)i** *r'1 curret JAVA (ersi'
!. unsigned primitive types turned out to never be implemented in Java
A. 0he enum &ey%ord $or enumerated types %as implemented in Java $or Java C.#.
3. 0he assert &ey%ord %as also implemented in Java $or Java C.#
D. Abstract methods %ere de$ined as in +,,.
C. 0he pac&age private access level did not e?ist in -a&. +lasses %ith no access modi$ier %ere
considered private.
J). 1.1 /2e3ruar, 19, 19970
Major additions included7
an e?tensive retooling o$ the A60 event model
inner classes added to the language
Java*eans
J*+
9MI(9emote Method Invocation/

J#SE 1.# /)ece13er 4, 19940 (!odename $laygroun)3


4 | P a g e
5 1994 the J@ %as removed and it named as JAS< (Java A Standard <dition/ to distinguish the
base plat$orm $rom JA<< (Java A 'lat$orm) <nterprise <dition/ and JAM< (Java A 'lat$orm) Micro
<dition/.
Major additions included7
strict$p &ey%ord
9e$lection %hich supported Introspection only) no modi$ication at runtime %as possible.
the S%ing graphical A'I %as integrated into the core classes
Sun3s J:M %as e4uipped %ith a JI0 compiler $or the $irst time
Java 'lug-in
Java I5) an I5 implementation $or +-9*A interoperability
+ollections $rame%or&
J#SE 1.% /Ma, 4, #0000 (!odename 4estrel3
Major changes are7-
EotSpot J:M included (the EotSpot J:M %as $irst released in April) !""" $or the JAS< !.A
J:M/
9MI %as modi$ied to support optional compatibility %ith +-9*A
JavaSound
Java ;aming and irectory Inter$ace (J;I/ included in core libraries (previously available
as an e?tension/.
J#SE 1.! /2e3ruar, 6, #00#0 /!odename Merlin3
assert &ey%ord (Speci$ied in JS9 D!./
regular e?pressions modeled a$ter 'erl regular e?pressions
e?ception chaining allo%s an e?ception to encapsulate original lo%er-level e?ception
Internet 'rotocol version B (I'vB/ support
image IF- A'I $or reading and %riting images in $ormats li&e J'<G and ';G
Integrated GM5 parser and GS50 processor (JAG'/ (Speci$ied in JS9 C and JS9 B3./
integrated security and cryptography e?tensions (J+<) JSS<) JAAS/
Java 6eb Start included (Java 6eb Start %as $irst released in March) A##! $or JAS< !.3/
J#SE 5.0 /Septe13er %0, #00!0 (!odename 5iger3
-riginally numbered !.C) %hich is still used as the internal version number.
JAS< C.# entered its end-o$-li$e on April .) A##. and
5 | P a g e
6eerics$ 'rovides compile-time (static/ type sa$ety $or collections and eliminates the need $or
most typecasts (type conversion/. (Speci$ied by JS9 !D./
Aut'3'7i"8u3'7i"$ Automatic conversions bet%een primitive types (such as int/ and
primitive %rapper classes (such as Integer/. (Speci$ied by JS9 A#!./
Eu1erati's$ 0he enum &ey%ord creates a typesa$e) ordered list o$ values (such as
ay.M-;AH) ay.0U<SAH) etc./. 'reviously this could only be achieved by non-
typesa$e constant integers or manually constructed classes (typesa$e enum pattern/.
(Speci$ied by JS9 A#!./
S9i"7 ;e% s&innable loo& and $eel) called synth.
:ar args7 0he last parameter o$ a method can no% be declared using a type name $ollo%ed
by three dots (e.g. void dra%te?t(String... lines//. In the calling code any number o$
parameters o$ that type can be used and they are then placed in an array to be passed to the
method) or alternatively the calling code can pass an array o$ that type.
<nhanced $or each loop7 0he $or loop synta? is e?tended %ith special synta? $or iterating
over each member o$ either an array or any Iterable) such as the standard
Ja(a :a1i"
It3s very simple. 6ith the versions o$ the plat$orm shipped early A##B) the Java name lost the 1A1)
and the 1dot 2ero1.
JAS< B.# became Java S< B) and JAS< I.# %ill become Java S< I.
JA<< C.# became Java << C.
JAM< became Java M< as o$ June A##C) because it does not have a version number.
+urrent versions as %ell as older versions o$ the plat$orm %ill maintain their current naming ($or
e?ample) JA<< !.D) JAS< C.#) JAS< !.D.?) and so on/.
0he Java A plat$orm has been an incredible success. Introduced as a major revision o$ Java
technology in !""") its editions = the <nterprise <dition) Standard <dition) Micro <dition (9hich
e(er ad'pted the "#" i its 3rad a1e/ = have become standards in their development
specialties. Eo%ever) dropping the 1A1 $rom the ne?t releases better re$lects the level o$ maturity)
stability. In addition) by eliminating the 1A1) %e also eliminate version con$usion7 e.g.
Java A 'lat$orm) <nterprise <dition B) and %e %on3t leave anybody %ondering %hen Java 3) Java D)
Java C are comingJ 5astly) the ne% naming %ill help accelerate brand recognition %ith non-
technical audiences (e.g. consumers) business press) business analysts) etc./.
Ja(a SE 6.0 /Mon)ay Decem%er !! 200"0
It has been released %ith the promises to ease the comple?ities $aced in the JSE 5. >ollo%ing are
the ne% $eatures in S< B.
6 | P a g e
!. ;ha"es i 58O
0his is a ne% $eature added in Java S< B) %hich has the ability to read te?t $rom a
terminal %ithout having it echo on the screen through java.io.+onsole.

A. ;ha"es i jar ad <ip
Jar and 2ip support has been enhanced in J@ B. In this) t%o ne% compressed streams
have been added. 0hese are java.util.2ip.e$laterInputStream and
java.util.2ip.In$later-utputStream.
3. Ja(a +lat*'r1 )e3u""er Architecture Ehace1ets
J:MI (Java :irtual Machine ebugger Inter$ace/ has been deleted in JA:A S< B and
J'A(Java 'lat$orm ebugger Architecture/ has been added. Some ne% Methods are
included li&e boolean canGetInstanceIn$o(/ and much more8
D. :e9 +acka"e ja(a.util.spi i J). 6
A ne% pac&age Java.util.spi has been included in JA:A S< B.

C. Ehace1ets i ja(a.la".;lass ad ja(a.la".re*lect
Some ne% Methods are included in java.lang.+lass li&e 7 getInter$aces(/) get+lasses(/)
get+onsturctors(/) getMethod(String) +lass8/ and much more8.
B. JAVA SE 6 Securit, Ehace1ets
it added some security $unctionality7 the GM5 igital signature A'I Smart +ard IF-
A'I.
Ja(a SE 7 /Jul, #4, #0110
Java S< I %as released on A. July A#!!. Its code name is Dolphin. It %as $irst launched on I July
A#!! but made available to general public on A. July A#!!. uring development period) !3
milestone %as achieved. >ollo%ing is the list o$ ne% $eatures added to the Java I7
+hanges in Java 'rogramming 5anguages 7
!. Strings in S%itch statement.
A. 0ry %ith Automatic resource Management.
3. <nhanced 0ype In$erence $or Generic Instance +reation
D. Improved +ompiler 6arnings and
7 | P a g e
C. *inary literals
B. Underscores in ;umeric 5iterals
I. Multiple <?ception +atching and <?ceptions 9ethro%ing %ith Improved 0ype
+hec&ing
.. 0%o ne% pac&ages, java.nio.file and java.nio.file.attribute , are added to improve
plat$orm independence and add support $or metadata and symbolic lin&s.
". Enhancement of Rich Internet Applications (RIA) 7 9e4uesting and +ustomi2ing Applet
ecoration in ragg able Applets
Ja(a SE 4 /April #4, #01!0 =atest (ersi' '* ja(a
Reuirements of !ava
*e$ore you start %ith java programming ma&e sure you are ready %ith these things. o%nload the
J@ $rom the o$$icial site o$ oracle.
JAVA )EVE=O+ME:> >OO=.5> /J).0 s'1e ti1e S). /s'*t9are de(el'p1et >''lkit0
!. S@ is a generic term. S@ has a %hole set o$ libraries and tools that ma&e up their Java
plat$orm8 *ut you don3t %ant the entire thing ($or e?ample) right no%) you do not need Java
<</. Hou just %ant the essential core) the basic java compiler and core plat$orm. 0hey call
that the J@ to di$$erentiate it $rom the entire plat$orm S@ as a %hole.
A. J@ is a bundle o$ so$t%are by Sun micro System to develop a java based program or
so$t%are.
3. J@ provides large number o$ development tools li&e compiler) J:M (Java :irtual
Machine/) J9< (Java runtime <nvironment/) javadoc) javah) and many more java A'I
(Application program inter$ace/ %hich contain large no o$ build in classes and inter$aces.
D. J@ is used $or e?ecuting java application program) Applet program.
8 | P a g e
JAVA ?@:>5ME E:V5?O:ME:> /J?E0
!. J9< is a so$t%are pac&age that is responsible to convert byte code to binary code.
A. J:M is present inside the J9<. Again it contains some additional components to run
application and applet program %ritten in java.
3. 6e can get lot o$ version o$ J:M $rom the net because J9< contains J:M and J:M di$$ers
%ith the hard%are and so$t%are architecture.
D. J9< is less %aited as compare to J@ because J9< is present inside the J@
A++=5;A>5O: +?O6?AMM5:6 5:>E?2A;E /A+50
!. A'I is the collection o$ classes) methods and inter$ace that comes %ith jd&.
A. Actually java A'I is a huge collection o$ library $unction that pe$orrm the basic
programming tas& such as IF- operation.
3. In java A'I classes and inter$aces are placed in a pac&age ($older in general sense/. All these
classes are %ritten in java language.
D. Java classes are plat$orm independent because J:M is plat$orm dependent.
JAVA V5?>@A= MA;&5:E /JVM0
Java virtual Machine (J:M/ is a virtual Machine that provides runtime environment to e?ecute java
byte code. J:M are most o$ten implemented to run on e?isting operating system. It is provides
runtime environment in which java bytecode can be executed.
J:M control e?ecution o$
every Java program. It enables
$eatures such as automated e?ception
handling) Garbage-collected heap
Internal Architecture o$ J:M
It contains classloader) memory area)
e?ecution engine etc.
10 ;lassl'ader$ +lassloader is a
subsystem o$ J:M that is used to load
class $iles.
9 | P a g e
#0 ;lass/Meth'd0 Area$ +lass(Method/ Area stores per-class structures such as the runtime constant pool)
$ield and method data) the code $or methods.
%0 &eap$ It is the runtime data area in %hich objects are allocated.
D/ Stac&7 Java Stac& stores $rames.It holds local variables and partial results) and plays a part in method
invocation and return.<ach thread has a private J:M stac&) created at the same time as thread.
A ne% $rame is created each time a method is invo&ed. A $rame is destroyed %hen its method invocation
completes.
50 +r'"ra1 ;'uter ?e"iser$ '+ (program counter/ register. It contains the address o$ the Java virtual
machine instruction currently being e?ecuted.
B/ ;ative Method Stac&7 It contains all the native methods used in the application.
I/ <?ecution <ngine7 It contains7
!/ A virtual processor
#0 5terpreter$ 9ead bytecode stream then e?ecute the instructions.
%0 JustA5A>i1e/J5>0 c'1piler$ It is used to improve the per$ormance.JI0 compiles parts o$ the byte code
that have similar $unctionality at the same time) and hence reduces the amount o$ time needed $or
compilation.Eere the term 8compiler8 re$ers to a translator $rom the instruction set o$ a Java virtual machine
(J:M/ to the instruction set o$ a speci$ic +'U.
1: | P a g e