Você está na página 1de 7

The History of Java Technology

Since 1995, Java has changed our world . . . and our expectations..
Today, with technology such a part of our daily lives, we take it for granted th
at we can be connected and access applications and content anywhere, anytime. Be
cause of Java, we expect digital devices to be smarter, more functional, and way
more entertaining.
In the early 90s, extending the power of network computing to the activities of
everyday life was a radical vision. In 1991, a small group of Sun engineers call
ed the "Green Team" believed that the next wave in computing was the union of di
gital consumer devices and computers. Led by James Gosling, the team worked arou
nd the clock and created the programming language that would revolutionize our w
orld Java.
The Green Team demonstrated their new language with an interactive, handheld hom
e-entertainment controller that was originally targeted at the digital cable tel
evision industry. Unfortunately, the concept was much too advanced for the them
at the time. But it was just right for the Internet, which was just starting to
take off. In 1995, the team announced that the Netscape Navigator Internet brows
er would incorporate Java technology.
Today, Java not only permeates the Internet, but also is the invisible force beh
ind many of the applications and devices that power our day-to-day lives. From m
obile phones to handheld devices, games and navigation systems to e-business sol
utions, Java is everywhere!
The Java History Timeline
>1991
The Green Project Begins
MS DOS is the dominant operating system
Cell phones weigh half a pound
"Biosphere 2" project begins
>1992
"Oak" is the language
*7 Debuts
"Duke" is featured in the Interface
Johnny Carson signs off "The Tonight Show" on NBC
>1993
The Green Project becomes FirstPerson
Mosaic v1.0 is released
"Cheers" ends an 11-year run
>1994
WebRunner released the first browser that supports moving objects and dynamic e
xecutable content
The Apple QuickTake 100, the first consumer digital camera, goes on sale for le
ss than $1,000
"Friends" debuts on NBC
>1995
Java technology released to a select group on the Web site wicked.neato.org
The San Jose Mercury News runs a front-page article about Java technology
Name changed from "Oak" to "Java"
Announced at Sun World -- Java technology is officially born
>1996
The first JavaOne Developer Conference
JDKtm 1.0 software is released
Chess computer Deep Blue defeats Garry Kasparov for the first time
"Dolly" the first cloned sheep is born
>1997
Over 220,000 downloads of JDK 1.1 software occur in just three weeks
JavaOne draws 8,000 attendees, becoming the world's largest developer conferenc
e
Java Card 2.0 platform is unveiled
43% of U.S. families own a computer
1998
JDK 1.1 release downloads top 2 million
Visa launches world's first smart card based on Java Card technology
The Java Community Process (JCP) program formalized
"Who Wants to Be a Millionaire?" premieres in the U.K
>1999
Java 2 platform source code is released
JavaOne draws 20,000
J2EE beta software is released
"Star Wars Episode I: The Phantom Menace" released
>2000
Over 400 Java User Groups are established worldwide
Java Developer Connection program tops 1.5 million members
Steve Jobs joins Scott McNealy on stage at JavaOne to announce a major commitme
nt by Apple in support of Java technology
Heavy Metal band Metallica sues Napster for copyright violations
>2001
First international JavaOne conference in Yokohama Japan
Over 1 million downloads of the Java Platform, Enterprise Edition (Java EE) SDK
Google Inc. PageRank search algorithm patent awarded
"The Lord of the Rings: The Fellowship of the Ring" is released
2002
J2EE SDK downloads reach 2 million
78% of executives view J2EE technology as the most effective platform for build
ing and deploying Web services
The Euro is introduced
"The Osbournes" becomes a surprise hit on MTV
> 2003
Java technology runs in almost 550 million desktops
Almost 75% of professional developers use Java programming language as their pr
imary development language
Commercial Voice-Over-Internet (VoiP) phone service begins
"The Da Vinci Code" is published
2004
Java 2 Platform, Standard Edition 5 (Project Tiger) is released
The Java technology-powered Mars Rover (Spirit) touches down on Mars
Sun Java Studio Creator is launched
2005
Java technology celebrates its 10th birthday
Approximately 4.5 million developers use Java technology
Over 2.5 billion Java technology-enabled devices are available
java.com bundles the Google Toolbar with the JRE download
>2006
Rich Green announces at the JavaOne 2006 Conference that it's not a matter of w
hen Sun will open source Java technology, but how. The NetBeans IDE 5.0 is rele
ased. Sun open-sourced Java EE components as the Glassfish Project to java.net.
Java SE and ME initial components are released as open source. Pirates of the C
aribbean: Dead Man's Chest is released.
________________________________________
Principles of OOPs
All object programming languages provide us with few basic mechanisms which can
be termed as Basic principles of OOPs and they are
1. Encapsulation
2. Inheritance
3. Polymorphism
We will discuss each one of them in detail in the section below as they hold the
key to successful implementation to the object Oriented Model approach.
Encapsulation
One of the very important mechanisms implemented in OOPs is encapsulation. It he
lps the programmer to keep its code and the data safe from outside interference
and misuse. It keeps the code intact to be used safely. It can also be termed as
the cover or the wrapper which works as a shield to safeguard the code from the
unauthenticated use of it. Access to the code and data inside the wrapper is ti
ghtly controlled through a well defined interface.
The encapsulated data can be used easily by the users without any fear of being
misused and without being having side effect.
Java Inheritance
As the term illustrates this mechanism has something to do with the feature inhe
rit which means to acquire the characteristics of the features of any object. th
is feature makes the OOPs more compatible as it needs any object to acquire only
the features or the characteristic which are unique and rest can be inherited f
rom its class.
Let s try and understand it with the example.
We have a class called mammal and we create instances of it by the name whale an
d horse. They both inherit the common features of a mammal as they both give bir
th to young ones and feed them on their milk.
They are required to have only the unique features separately as horse feeds on
grass and lives on ground and whale is a water animal and survives in water.
Thus Inheritance makes OOPs very much user friendly and compatible. But there is
one more thing in Java that it does not support multiple inheritance like C++.
It is not like that Java does not have the potential to handle that but it is no
t include in Java because multiple inheritance has it own drawback that is calle
d diamond shape problem. Dont worry, Java provides the mechanism for multiple in
heritance through Java Interfaces.
Java Polymorphism
This term originates from the Greek word which means many forms. With this mecha
nism it is possible in OOPs to design one interface and implement it with multip
le methods or actions. More generally, the concept of polymorphism is often expr
essed by the phrase one interface and multiple methods. The compiler takes the e
ntire responsibility of identifying the situation and implements that particular
method on the code with respect to it and hence making the life of the programm
er very easy and simple.
Taking an example of the smelling characteristic of Dog.
Smelling a rat or mouse will make him realize that there is a prey nearby and he
nce he barks and tries to locate the prey, on the other hand if the dog gets the
smell of food he is very much sure that it is his food and thus runs towards it
s food instead of barking which he was doing in the previous situation, so it s th
e same feature having the different actions or methods to be implemented.
The same concept is been applied by the complier in case of polymorphism making
it very effective and compatible for the programmer while implementing the conce
pts of OOPs.
Characteristics of OOP
? Objects
Objects are the basic run time entities in an object oriented system. They may r
epresent a person, a, place, a bank account, a table of data or any item that th
e program has to handle. Objects take up space in memory and have an associated
address like record in Pascal, or a structure in C.
? Classes
These are the building blocks of OOPLs. It is the collection of data & functions
operates on that data. Classes are nothing but encapsulation of data & function
? Data abstraction & Encapsulation
The wrapping up of data and functions into a single unit [called class] is known
as encapsulation. Data encapsulation is the most striking feature of a class. T
he data is not accessible to the outside world, and only those functions which a
re wrapped in the class can access it. These functions provide the interface bet
ween the objects data and the program. This insulation of the data from direct a
ccess by the program is called data hiding or information hiding. Abstraction re
fers to the act of representing essential features without including the backgro
und details or explanations.
? Inheritance
It is property or one of the best features that is used to higher properties one
class by another. Used by most of programmers to reduce programming time
? Polymorphism
It is characteristic using which we can assign a single name to multiple functio
ns. To differentiate functions either we can change the argument type or number
of arguments.
1. Function Overloading
2. Operator Overloading
3. Virtual Function
? Dynamic Binding
Binding refers to the linking of a procedure call to the code to be executed in
response to the call. Dynamic binding (also known as late binding) means that th
e code associated with a given procedure call is not known until the time of the
call at the run time. It is associated with polymorphism and inheritance.
? Message Passing
An object oriented program consists of a set of objects that communicate with ea
ch other. The process of programming in an object oriented language, therefore i
nvolves the following basic steps:
1. Creating classes that define objects and their behavior,
2. Creating objects from class definitions, and
3. Establishing communication among objects.
Message passing involves specifying the name of the object, the name of the func
tion and the information to be sent.
***************************
Polymorphism
This ability of different objects to respond each in its own way to identical me
ssages is called polymorphism.
Polymorphism results from the fact that every class lives in its own name space.
The names assigned within a class definition won't conflict with names assigned
anywhere outside it. This is true both of the instance variables in an object's
data structure and of the object's methods:
Just as the fields of a C structure are in a protected name space so are an obje
ct's instance variables.
Method names are also protected. Unlike the names of C functions method names ar
en't global symbols. The name of a method in one class can't conflict with metho
d names in other classes; two very different classes could implement identically
named methods.
Method names are part of an object's interface. When a message is sent requestin
g an object to do something the message names the method the object should perfo
rm. Because different objects can have different methods with the same name the
meaning of a message must be understood relative to the particular object that r
eceives the message. The same message sent to two different objects could invoke
two different methods.
The main benefit of polymorphism is that it simplifies the programming interface
. It permits conventions to be established that can be reused in class after cla
ss. Instead of inventing a new name for each new function you add to a program t
he same names can be reused. The programming interface can be described as a set
of abstract behaviors quite apart from the classes that implement them.
*******************************
Inheritance
The easiest way to explain something new is to start with something old. If you
want to describe what a ``schooner'' is, it helps if your listeners already know
what ``sailboat'' means. If you want to explain how a harpsichord works, it's b
est if you can assume your audience has already looked inside a piano, or has se
en a guitar played, or at least is familiar with the idea of a ``musical instrum
ent.''
The same is true if want to define a new kind of object; the description is simp
ler if it can start from the definition of an existing object.
With this in mind, object-oriented programming languages permit you to base a ne
w class definition on a class already defined. The base class is called a superc
lass; the new class is its subclass. The subclass definition specifies only how
it differs from the superclass; everything else is taken to be the same.
Nothing is copied from superclass to subclass. Instead, the two classes are conn
ected so that the subclass inherits all the methods and instance variables of it
s superclass, much as you want your listener's understanding of ``schooner'' to
inherit what they already know about sailboats. If the subclass definition were
empty (if it didn't define any instance variables or methods of its own), the tw
o classes would be identical (except for their names) and share the same definit
ion. It would be like explaining what a ``fiddle'' is by saying that it's exactl
y the same as a ``violin.'' However, the reason for declaring a subclass isn't t
o generate synonyms, but to create something at least a little different from it
s superclass. You'd want to let the fiddle play bluegrass in addition to classic
al music.
*****************************
Data encapsulation
You may wonder what the point of all the above code is. Wouldn t it have been easi
er to make the
minPasswordLength field public, so that we could access it directly and not have
to bother about any
properties? The answer is that fields represent the internal data of an object,
so they are an integral part
of the functionality of an object. Now, in OOP, we aim to make it so that users
of objects only need to
know what an object does, not how it does it. So making fields directly accessib
le to users defeats the
ideology behind OOP.
Ideology is all very well, but there must be practical reasons behind it. One re
ason is this: if we make
fields directly visible to external users, we lose control over what they do to
the fields. They might modify
the fields in such a way as to break the intended functionality of the object (g
ive the fields inappropriate
values, let s say). However, if we use properties to control access to a field, th
is is not a problem because
we can add functionality to the property that checks for inappropriate values. R
elated to this, we can also
provide read-only properties by omitting the set accessor completely. The princi
ple of hiding fields from
client code in this way is known as data encapsulation.
_______________________________________
Operators
Now that you've learned how to declare and initialize variables, you probably wa
nt to know how to do something with them. Learning the operators of the Java pro
gramming language is a good place to start. Operators are special symbols that p
erform specific operations on one, two, or three operands, and then return a res
ult.
As we explore the operators of the Java programming language, it may be helpful
for you to know ahead of time which operators have the highest precedence. The o
perators in the following table are listed according to precedence order. The cl
oser to the top of the table an operator appears, the higher its precedence. Ope
rators with higher precedence are evaluated before operators with relatively low
er precedence. Operators on the same line have equal precedence. When operators
of equal precedence appear in the same expression, a rule must govern which is e
valuated first. All binary operators except for the assignment operators are eva
luated from left to right; assignment operators are evaluated right to left.
Operator Precedence
Operators Precedence
postfix expr++ expr--
unary ++expr --expr +expr -expr ~ !
multiplicative * / %
additive + -
shift << >> >>>
relational < > <= >= instanceof
equality == !=
bitwise AND &
bitwise exclusive OR ^
bitwise inclusive OR |
logical AND &&
logical OR ||
ternary ? :
assignment = += -= *= /= %= &= ^= |= <<= >>= >>>=
In general-purpose programming, certain operators tend to appear more frequently
than others; for example, the assignment operator "=" is far more common than t
he unsigned right shift operator ">>>". With that in mind, the following discuss
ion focuses first on the operators that you're most likely to use on a regular b
asis, and ends focusing on those that are less common. Each discussion is accomp
anied by sample code that you can compile and run. Studying its output will help
reinforce what you've just learned.
Java operators fall into eight different categories: assignment, arithmetic, rel
ational, logical, bitwise,
compound assignment, conditional, and type.
Assignment Operators =
Arithmetic Operators - + * / % ++
--
Relational Operators > < >= <= == !=
Logical Operators && || & | ! ^
Bit wise Operator & | ^ >> >>>
Compound Assignment Operators += -= *= /= %
= <<= >>= >>>=
Conditional Operator ?:

Você também pode gostar