15-06-2012, 11:43 AM
INTRODUCTION OF JAVA
INTRODUCTION OF JAVA.ppt (Size: 1.19 MB / Downloads: 37)
JAVA
Java is related to C++, which is a direct descendent of C.
Much of the character of Java is inherited from these two languages.
From C, Java derives its syntax.
Many of Java’s object-oriented features are influenced by C++
C++ and JAVA Differences
JAVA is a better object oriented language than C++
It is not possible in JAVA to write a program without using Classes
Pointers do not have any significance in JAVA
Operator overloading in C++ is not possible in JAVA
JAVA – write once, compile once and run anywhere
JAVA has a rich library of classes
Multiple inheritance not allowed
Goto removed
Multithreading
Evolution of JAVA
Java was developed by James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan at Sun Microsystems, Inc. in 1991.
This language was initially called “Oak” but was renamed “Java” in 1995.
The original motive for Java was not the Internet ! Instead, the primary motivation was the need for a platform-independent (that is, architecture neutral) language that could be used to create software to be embedded in various consumer electronic devices, such as microwave ovens and remote controls.
The trouble with C and C++ (and most other languages) is that they are designed to be compiled for a specific target.
The problem could have been solved by developing separate compiler for separate machines but compilers are expensive and time-consuming to create.
An easier and more cost-efficient solution was needed.
In an attempt to find such a solution, Gosling and others began work on a portable, platform-independent language that could be used to produce code that would run on a variety of CPUs under differing environments.
This effort ultimately led to the creation of Java.
About the time when Java was being developed, a second, and ultimately more important, factor was emerging that played a crucial role in the future of Java. This second force was, the World Wide Web.
With the emergence of the World Wide Web, Java was propelled because the Web, too, demanded portable programs.
Java is not a language with training wheels. It is a language for professional programmers.
Java Applets and Applications
Code development in Java revolves around the two demands of www.
Java can be used to create two types of programs: applications and applets.
An application is a program that runs on our computer. That is, an application created by Java is more or less like one created using C or C++.
An applet is an application designed to be transmitted over the Internet and executed by a Java-compatible Web browser.
An applet is actually a tiny Java program, dynamically downloaded across the network, just like an image, sound file, or video clip.
The important difference is that an applet is an intelligent program, not just an animation or media file. An applet is a program that can react to user input and dynamically change - not just run the same animation or sound over and over.