Discover the amazing world of Indonesia


History of Java

The java programming language is becomingstill complex with things like pointers,
more and more popular each day. It is thememory  leak  and  multiple
language without which one cannot even hope
to  a  land  a  job  theseinheritence.  The  pointer
days. But has somebody even wondered howconcept was taken from C and it was very
this language came about? There are manymessy! The pointer is special type of
stories about, many books have been written.variable
Here is my version (not approved by Sun
Microsystems).The java programming languagethat points to other variables. Since there
originated in Indonesia. It was meant to bewas  no  guidelines  as  to  how  to  use
used
these pointers, it was very easy loose track
by the tourists that visit that country eachof them. In a typical two thousand lines
year. Why would tourists want to useprogram, one would frequently end up with
computer? Well, these are no ordinaryhundredes  of  pointers  pointing
tourists.  They  are  rich  tourists.  Have
to thousands, some of them are pointers and
they not been rich, they would not travelsome  just  plain  variables.  Needless
half  way  around  the  world  to visit this
to say this made a large program extremely
place. Most people would be content to seedifficult  to  read  and  when  the
just  what  is  available  near  by.  For
programmer left for another company, they
example, if you are a texan living inwould  have  no  other  choice  than
Dallas, you will visit the stockyards or may
be  theto just throw away his program! It was
sometimes  necessary  to  do  this  even
trinity river park. If you live in New
Orleans  area,  you  would  see  st.  mary'swhen the programmer was around and very much
alive. This is because the pointers he
bayou. Once in your lifetime, one willcreated inside his program had taken a life
probably  visit  Hawaii  or  Niagara.  Butof  their  own  and  defy
going to Indonesia and its islands, Bali,every attempt to predict how the program
Java,  etc  is  not  for  the  ordinaryshould  behave.
people. Anyway, coming back to the questionMemory management was also another weak
why  these  tourists  need  to  usepoint  of  C  and  C++.  The  programmer  was
computer programs. They go there not just toresponsible for cleaning up the memory their
have  fun  and  also  get  some  workprogram  would  allocate  and  use.
done in a fun atmosphere as these people areFailure to do so will result in a crash of
very important people.From the very startthe whole computer.Multiple inheritence,
java was supposed to be computer independent.though  sparingly  used,  was
That  means  if
another feature of C++ which made a
you write a program in java in one computer,programmer's  life  miserable.  It, however,
it  should  run  in  all  computers.
had its use, especially in job interviews.
This was necessary because tourists bringThis  one  question,  they  thought,
all  kinds  of  computers  with  them.
helped them separate the wheat from the
Some  bringchaff.But C++ still had some nice and simple
features, like inheritence, encapsulation,
Windows machine, some Apple mackintosh. Someetc. They are something one can describe in
of  the  affluent  ones  bringplain  english,
Sun server workstations or even a supersomething one can explain to a layman. So
computer.Before starting to create java theythe  creator  of  java  decided  to  take
also  sought  to  see  if there have similar
the good features of inherience,
stuff done already. Even though they couldencapsulation,  and  polymorphism  from C++,
find  none,  they  found  they  can  use
while discarding the bad features such as
lots of feature from some existing laguages.multiple  inherience,  pointers  etc.
One such language they found was C++. C++ was
an advancement over the language called C. InThe  memory  management  was
fact,  ideas  of
improved in java where the programmer will
C++ was already hidden in C. In thatnot be held responsible for memory
language,  one  can  increment  a  variable,management.  They
say i, by applying the ++ operator e.g. i++.can clean up after themselves if they want
This  would  increase  the  value  ofto  get  extra  credit,  but  they  do  not
the variable i by one. If i had a value ofneed to. Needless to say all these was great
5,  it  would  make  it  6,  etc.news to the tourists in Indonesia!Java
introduced lot of clarity in notations too.
What a vision!Anyway, coming back to C++, itFor  example,  in  C++  they
made an important advancement over C by
introducing the idea of a class. Towould say class doctor:person to mean
understand  class,  one  has  to  undestanddoctor  is  derived  from  person.
structure which was already used in C. TheIt is obviously very cryptic. The same
structure  is  a  group  of  variables.situation  can  be  expressed
For example, you have a name, an address,in java as class doctor extends person ,
age  etc.  for  any  person.  In  stead  ofwhich is much easier to understand. But there
are few awkward stuff in java too especially
using them separately, in C one can groupwhen  someone
them  together  and  call  it  a  person.
says class bum extends person (my last bum
The creator of C++ said there is no need tojoke)!Java made an important contribution in
expose these variables (name, address, etc)the  graphical  user  interface  (GUI)  area.
to the outside world. They said these details
should  be  hiddenC++ was really lacking in expertise here.
They  visual  C++,  but  worked  only  on
from the outside world. They called this
concept  encapsulation.Another importantwindows environment. But it did not work in
UNIX  systems  or  mackintoshes.  Just
contribution of C++ was the concept of
inheritence.  This  concept  can  be  bestlike other features of java, this was also
supposed  to  be  platform  independent.
explained by example. Let's go back to the
example  of  the  person.  A  person  isThis was further necessary because one can
put some little GUI on a web page which can
very general concept. There can be manybe views over the internet. And one cannot
different  kinds  of  persons,  e.g  doctors,control what kind of computers other will
have.After a while, it was necessary to call
lawyers, teachers, or just a bum! But eachprograms  from  one  computer  to  another
of these people have a name, an address, age
etc. Even a bum has all these. The creator ofcomputer. To do this, they created J2EE. I
C++  thought  one  canam  not  sure  how  they  came
define a base class call person and otherup with the name J2EE. The 'J' of J2EE, of
classes  can  be  derived  from  it.  Incourse,  means  "Java",  and  I  can  be
plain english, this would mean, a doctor isreasonably sure '2' stands for 'To'. But I
special  kind  of  person,  lawyer  isdo  not  know  what  the  'EE'  part  is  all
another special kind of person. Now theabout,  probably  some  kind  of extension.
common attributes of all these kinds of
people  can  be  put  inOr at this point they ran out of names to
think  of.  So  they  decided  to
the person class and special attributes can
be  put  in  the  derived  classes,  e.g.have one of those just another vague
acronyms.If you would like, you can also
hospital for the doctor, court for thevisit my home page.
lawyer, and nothing for the bum.But C++ was



1 A B C D E F 84 86 87 88 89 90 91 92 93 94 95 96 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130