Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Introduction To JAVA

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Introduction to JAVA

Mr. Prashant Kulkarni


Java is an Object Oriented Programming Language.
History of JAVA:
In 1991, a Group of Sun Engineers (Patrick Naughton & James Gosling)
wanted to design a computer language
used to write programs
for consumer electronic devices.

These devices do not have lot of power or memory,


So,
The language had to be small & generate very tight code.

Also,
Different manufacturer may choose different CPU/Platform.
So,
It was important that the language is independent of CPU architecture.
This project was named as “Green”.

Mr. Prashant Kulkarni


The Sun team constructs a model that generates an intermediate code.
Then,
This intermediate code could be used on any machine
that had the correct interpreter.

The model is called as JVM (Java Virtual Machine).

The Sun peoples are come from UNIX background.


So,
Their new language based on C++ i.e. Object Oriented

James Gosling decided to call this language as “Oak”.


But later,
The team realized that Oak was the name of an existing language,
So,
They changed the name to “JAVA”.
Mr. Prashant Kulkarni
In 1992,
The Green project delivered its first version, called “*7”.

Unfortunately,
No one was interested to use this for their product

The team spends all 1993 and half 1994 looking for people to buy its
technology. But no one found.

During same period,


The World Wide Web (WWW) part of Internet was growing bigger and
bigger.

The key to this web is “Browser” that translates the hypertext page to web
screen.

Mr. Prashant Kulkarni


In 1994,
Gosling Team realized that they could build a browser
that needs some things to be wired
i.e.
Architecture Neutral,
Real Time, Reliable,
and Secure.

So,
Patrick Naughton & Team build a browser known as “HotJava” browser.

This browser was written in Java to show the power of Java.

This browser also had Power of Applet and it is capable of executing


code inside web pages.

Mr. Prashant Kulkarni


FEATURES OF JAVA (BUZZWORDS):
1) Simple

2) Object Oriented 9) High Performance

3) Distributed
10) Multithreaded
4) Reliable or Robust

5) Secure 11) Dynamics

6) Architecture Neutral

7) Portable

8) Interpreted

Mr. Prashant Kulkarni


1) Simple: -
It is primary characteristic of Java programming language.
The syntax for Java is some what similar to syntax of C++.

There is no need for header files, pointer arithmetic, structures,


union, operator overloading, virtual base class & so on.

Another aspect of being simple is that it required a basic interpreter &


class support for executing a Java program.

2) Object Oriented: -
Object oriented design is a technique for programming that focuses on
data.

Java provides clean & efficient object based development platform.


Programmers can access existing libraries of tested objects that provide
functionality ranging from basic data types to Graphical User Interface
Toolkits. Mr. Prashant Kulkarni
3) Distributed: -
Java has extensive libraries of routines for copying with TCP/IP
protocols like HTTP & FTP.

Java applications can open & access objects across the network.

The networking capabilities of Java are strong & easy to use.

The remote method invocation mechanism enables communication


between distributed objects.

Hence we say that Java is distributed.

Mr. Prashant Kulkarni


4) Robust (Reliable): -
Java programming language is designed for highly reliable software.

It provides extensive compile-time checking,


followed by a second level of run-time checking.

The memory management model is extremely simple.

Here objects are created with a new operator.

There is no explicit user-defined pointer data types, no pointer


arithmetic.

Java has a pointer model that eliminates the possibility of overwriting


& corrupting data, because it has automatic garbage collection.

Mr. Prashant Kulkarni


5) Secure: -
As java designs a program that is operate in distributed environments.
So,
Security is very important point.

Java technology lets you construct applications that can’t be invaded


from outside.

In network environment, applications written in the java programming


language are secure from intrusion by unauthorized code.

Mr. Prashant Kulkarni


6) Architecture Neutral: -
Java technology is designed to support applications that will be
executing on different network environments.

Java compiler produces bytecode, an intermediate code designed to


execute efficiently for multiple hardware & software platforms.

The same Java bytecode can run on any platform by using Java Virtual
Machine (JVM).

Mr. Prashant Kulkarni


7) Portable: -
Java technology specifies the size of the basic data types and the
behavior of its arithmetic operators.

Your Java program is same on every platform, and there are no data
incompatibilities across hardware and software architectures.
e.g.
An int type in java is always of 32 bits,
In C/C++,
It can be 16 bits or 32 bits depends on compiler vendors.

e.g.
There is an Abstract Window Toolkit Classes and its implementations on
UNIX, Windows, and Macintosh is same.

Mr. Prashant Kulkarni


8) Interpreted: -
Java Interpreter can execute Java byte codes directly on any machine.
In Java technology the linking is incremented and lightweight.
So,
The development process can be much more rapid and exploratory
than the traditional compile – link – execute process.

9) High Performance: -
The Java platform achieves superior performance
By
The automatic garbage collector runs a low priority background
process,
So that
More memory is available when required leading to better performance.

Mr. Prashant Kulkarni


10) Multithreaded: -
Java provides the way to build an application with many concurrent
activities i.e. called as threads.
So,
It results in interactivity for the end user.

The Java language provides a class Thread and run-time system provides
monitors and condition lock for different threads running concurrently.

Thread in java also has advantage of multiprocessor system if base OS


support it.

Mr. Prashant Kulkarni


11) Dynamic: -
Java is more dynamic language than any other i.e. C or C++.

The libraries can freely add new methods and instance variables
without any effect to their clients.

The Java run-time system is dynamic in their linking stages.

Classes are linked only as needed. New code modules can be linked as
per demand from variety of sources, even from across the network.

Mr. Prashant Kulkarni


JAVA DEVELOPMENT KIT (JDK):
The Java Development Kit (JDK) is a Sun Microsystems product for
Java developers.

The primary components of the JDK are a selection of programming


tools, like…

java: - The loader for Java applications.


This tool is an interpreter and can interpret the class files
generated by the javac compiler.

javac: - The compiler, which converts source code into Java


bytecode.

jar: - The archiver, which packages related class libraries into a


single JAR file. This tool also helps managing jar files
(archived java class files).

The JDK also contains complete Java Runtime Environment.

It contains JVM and all of the class libraries.


Mr. Prashant Kulkarni
JAVA VIRTUAL MACHINE (JVM):
A Java Virtual Machine (JVM) is a set of software programs
and data structures which used for the execution of other computer
programs and scripts.

The model used by a JVM accepts a form of computer intermediate


language commonly referred to as Java bytecode.

JVM operate on Java bytecode, generated from Java source code.

The JVM is a crucial component of the Java Platform.

The use of the same bytecode for all platforms allows Java to be
described as "compile once, run anywhere“.

Mr. Prashant Kulkarni

You might also like