Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword or section
Like this
P. 1
Java Notes

Java Notes

Ratings: (0)|Views: 44|Likes:
Published by jsksjksksj

More info:

Published by: jsksjksksj on Sep 07, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





History of Java
In the early 1990's, putting intelligence into home appliances was though
t to be thenext "hot" technology.
Examples of intelligent home appliances:
Coffee pots and lights that can be controlled by a computer's programs.
Televisions that can be controlled by an interactive television device's programs.
Anticipating a strong market for such things, Sun Microsystems in 1991 funded aresearch project (code named Green) whose goal was to develop software forintelligent home appliances.
An intelligent home appliance's intelligence comes from its embedded processor chipsand the software that runs on the processor chips.
To handle the frequent turnover of new chips, appliance software must be extremelyportable.
Originally, Sun planned to use C++ for its home appliance software, but they soonrealized that C++ was less than ideal because it wasn't portable enough and it reliedtoo heavily on hard-to-maintain things called pointers.
Thus, rather than write C++ software and fight C++'s inherent deficiencies, Sundecided to develop a whole new programming language to handle its home appliancesoftware needs.
Their new language was originally named Oak (for the tree that was outside projectleader James Gosling's window), but it was soon changed to Java.
When the home appliance software work dried up, Java almost died before beingreleased.
Fortunately for Java, the World Wide Web exploded in popularity and Sun realized itcould capitalize on that.
Web pages have to be very portable because they can be downloaded onto any type of computer.
What's the standard language used for Web pages?
Java programs are very portable and they're better than HTML in terms of providinguser interaction capabilities.
Java programs that are embedded in Web pages are called applets.
Although applets still play a significant role in Java's current success, some of theother types of Java programs have surpassed applets in terms of popularity.
In this course, we cover Standard Edition (SE) Java applications. They are Javaprograms that run on a standard computer – a desktop or a laptop, without the needof the Internet.
Object Oriented Programming
When we approach a programming problem is an OOP ( Object OrientedProgramming ), we are no longer ask how the problem will be divided intofunctions, but think how it will be divided into objects.
Thinking in terms of objects rather than functions has a helpful effect ondesign process of programs because it’s closed match between objects inprogramming sense and objects in real worlds.
Read world objects are made up of both data and functions. Both arecombined into a single program entity. Where data represents Attribute(State) and Functions represents = Behavior of an object.
Data and its functions are said to be encapsulated into a single entity.
Benefits of OOPs Programming
Low Probability of Error.
The object-oriented approachWhy objects?What is a software object?
Because the world is made from distinct objects, which consist of other objects, etc., and this is often a natural and powerful way orepresenting a situation or problem.An object has two components:
State information which describes the current characteristics of the object and The program is written as a collection of interacting
An object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain.Or ""
Why do we care about objects?Software representation of a cat objectExamples of OO languages
C++Classic example uses C syntax
JavaBased on C++, often used for Web and graphics
Visual Basic, Visual C++Windows programming
Sleeps a lot
Catches mice
Fights other cats
Modularity - large software projects can be split up in smaller  pieces.
Reusability - Programs can be assembled from pre-writtensoftware components.
Extensibility - New software components can be written or developed from existing ones.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->