JAVA
Java is a general purpose, high level, object oriented
programming language, simple, reliable, portable, robust,
secure and powerful language.
Java is both a programming language and a platform.
Java was developed by Sun Microsystems of USA in
1991.
Java was originally called Oak by James Gosling one of
the inventors of the language.
Java was developed by the team James Gosling, Mike
Sheridan and Patrick Naughton.
Java was originally designed for the development of
software for consumer electronic devices like TVs , VCRs,
toasters and other electronic machines.
JAVA MILESTONES
1990 : Sun Microsystems decided to develop
special software that could be used for
electronic devices. A project called the Green
Project created and headed by James Gosling
1991 : After exploring the possibility of
using C++ with some updates that team
announced a new language named “Oak”
1992 : The team demonstrated the application
of their new language to control a list of home
appliances using a handheld device.
1993 : The World Wide Web appeared on
the internet and transformed the text-based
interface to a graphical rich environment.
The team developed web applets ( tiny
programs ) that could run on all types of
computers connected to the internet
1994 : The team developed a new web
browser called “ HotJava ” to locate and
run applets . HotJava gained instant
success
1995 : Oak was renamed to Java as it
did not survive legal registration . Many
companies such as Netscape and Microsoft
announced their support for Java
1996 : Java established itself as both
the language for internet programming and
a general-purpose object-oriented language
JAVA FEATURES
Features of Java are :
Compiled and interpreted language
Platform independent and portable
Object-oriented language
Robust and secure
Distributed
Simple and small familiar language
Multithreaded and interactive
High-performance
Dynamic and extensible
COMPILED AND INTERPRETED
Basically a computer language is either
compiled or interpreted . Java is a two stage
system which is both compiled and
interpreted.
In the first stage, Java compiler translates
source code into what is known as byte code
instructions. Byte codes are not machine
instructions.
In the second stage, Java interpreter
generates machine code that can be directly
executed by the machine that is running the
Java program.
In the above figure source code is given
input to the compiler which generates
bytecode. It is given input to the
interpreter which generates machine
language.
PLATFORM INDEPENDENT
Java code can be run on multiple
platforms that is Windows, Linux, Sun
Solaris, macOS etc.
Java code is compiled by the compiler and
converted into byte code ( .class ) file.
The byte code is executed by a Java
virtual machine [ JVM ]. This bytecode is a
platform independent code because it can be
run on multiple platforms ie: write once and
run anywhere ( WORA ).
PORTABILITY
First Java compiler generates byte code
instructions that can be implemented on
any machine .
Secondly the size of the primitive data
types are machine independent. Thus Java
is called as a platform independent and
portable language.
OBJECT ORIENTED
Java is a true object oriented language.
Everything is in Java is an object. All
program code and data reside within objects
and classes.
Java comes with an extensible thread of
classes, arranged in packages, that we can
use in our programs by inheritance.
The object model in Java is simple and
easy to extend by using inheritance.
ROBUST AND SECURE
It uses strong memory management.
There are lack of pointers that avoid security
problem.
There is automatic garbage collection in Java.
There is exception handling and type checking
mechanism in Java.
Java is best known for security . With Java we can
develop virus - free programs.
Java is secured because :
No explicit pointer
Java program is run inside virtual machine
DISTRIBUTED
Java is designed as a distributor language
for creating applications on networks. It has
the ability to share both programs and data.
Java applications can open and access
remote updates on internet as easily as they
can do in a local system.
This enables multiple programmers at
multiple remote locations to collaborate and
work together on a single project.
SIMPLE SMALL AND FAMILIAR
It is a simple and small language. Many
features of C and C++ that are either redundant
or sources of unreliable code and are not part of
Java.
Java does not use pointers, pre-processor
header files, go to statement and many others.
It also eliminates operator overloading and
multiple inheritance.
Familiarity is another second feature of Java.
Java looks like C++ code. Java is a simplified
version of C++.
MULTITHREADED
Multithreaded means handling multiple
tasking simultaneously. Java supports
multithreaded programmes this means that
we need not wait for an application to
finish one task before beginning another.
The Java run time comes with tools that
support multiprocessor , synchronization
and constructs that assist in smoothly
running interactive systems.
HIGH-PERFORMANCE
Java performance is impressive for an
interpreted language mainly due to the
use of intermediate byte code.
The incorporation of multithreading
enhances the overall execution speed of
Java programs.
DYNAMIC AND EXTENSIBLE
Java is dynamic language. Java is
capable of dynamically linking in a new
class libraries methods and objects.
Java is extensible by using the
concept Inheritance, which provide the
idea of reusability. This means that we
can add additional features to the
existing class without modifying it.