0% found this document useful (0 votes)
1 views7 pages

Chapter 2 - Java Evalution

Java is a general-purpose, object-oriented programming language developed by Sun Microsystems in 1991, initially designed for consumer electronics. It is known for its portability, reliability, and security, allowing programs to run on any system without modification. Java's features include being compiled and interpreted, object-oriented, robust, and multithreaded, making it a popular choice for web applications and software development.

Uploaded by

yogitas804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views7 pages

Chapter 2 - Java Evalution

Java is a general-purpose, object-oriented programming language developed by Sun Microsystems in 1991, initially designed for consumer electronics. It is known for its portability, reliability, and security, allowing programs to run on any system without modification. Java's features include being compiled and interpreted, object-oriented, robust, and multithreaded, making it a popular choice for web applications and software development.

Uploaded by

yogitas804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

JAVA EVOLUTION

Java History

Java is a general-purpose, object-oriented programming language developed


by Sun Microsystems of USA in 1991.Originally called Oak by James Gosling
(one of the inventor of the language). Java was invented for the development of
software for consumer electronic devices like TVs, toasters, etc. The main aim had
to make java simple, portable and reliable. The goal had a strong impact on the
development team to make the language simple, portable and highly reliable. The
Java team which included the existing languages like C and C++ had limitations in
terms of both reliability and portability. They modeled their new language Java on
C and C++ but removed a number of features of C and C++ that were considered
as sources of problems and thus made Java a really simple, reliable, portable and
powerful language.

Java is the first programming language that is not tied to any particular
hardware or operating system. Programs developed in Java can be executed
anywhere on any system. We can call Java as a revolutionary technology because
it has brought in a fundamental shift in how we develop and use programs. Nothing
like this has happened to the software industry before.

Java Features

The inventors of Java wanted to design a language which could offer solutions to
some of the problems encountered in modern programming. They wanted the
language to be not only reliable, portable and distributed but also simple, compact
and interactive. Sun Microsystems officially describes Java with the following
attributes:

 Complied and Interpreted


 Usually a computer language is either complied or interpreted. Java
combines both these approaches thus making Java a two stage system.
First, Java complier translates source code into what is known as
bytecode instructions. Bytecodes are not machine instructions and
therefore, in the second stage, Java interpreter generates machine code
that can be directly executed by the machine that is running the Java
program. We can thus say that Java is both a complied and an
interpreted language.

 Platform – Independent and Portable


 The most significant contribution of Java over other language is its
portability. Java programs can be easily moved from one computer
system to another, anywhere and anytime. Changes and upgrade in
operating systems, processors and system resources will not force any
changes in Java programs.
 Java ensures portability in two ways. First, Java complier generates
bytecode instructions that can be implemented on any machine.
Secondly, the size of the primitive data types are machine
independent.

 Object-Oriented
 Java is a true object oriented language. Almost everything in Java is
an object. All programs code and data reside within objects and
classes. Java comes with an extensive set 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.

 Robust and Secure


 Java is a robust language. It provides many safeguards to ensure
reliable code. It has strict compile time and run time checking for data
types. It is designed as a garbage collected language relieving the
programmers virtually all memory management problems. Java also
incorporates the concept of exception handling which captures series
errors and eliminates any risk of crashing the system.
 Security becomes an important issue for a language that is used for
programming on Internet. Threat of viruses and abuse of resources are
everywhere. Java systems not only verify all memory access but also
ensure that no viruses are communicated with an applet. The absence
of pointers in Java ensures that programs cannot gain access to
memory locations without proper authorization.
 Distributed
 Java is designed as a distributed language for creating applications on
networks. It has the ability to share both data and programs. Java
applications can open and access remote objects 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.

 Familiar, Simple and Small


 Java is a small and simple language. Many features of C and C++ that
are either redundant or sources of unreliable code are not part of Java.
It also eliminates operator overloading and multiple inheritance.
 Familiarity is another striking feature of Java. To make the language
look familiar to the existing programmers, it was modeled on C and
C++ languages. Java uses many constructs of C and C++ and
therefore, Java code “looks like a C++” code. In fact, Java is a
simplified version of C++.

 Multithreaded and Interactive


 Multithreaded means handling multiple tasks simultaneously. Java
supports multithreaded programs. This means that we need not wait
for the application to finish one task before beginning another. This
feature greatly improves the interactive performance of graphical
applications.
 The java runtime comes with tools that support multiprocess
synchronization and construct smoothly running interactive systems.

 High Performance
 Java performance is impressive for an interpreted language, mainly
due to the use of intermediate bytecode. According to Sun, Java speed
is comparable to the native C/C++. Java architecture is also designed
to reduce overheads during runtime.
 Dynamic and Extensible
 Java is a dynamic language. Java is capable of dynamically linking in
new class libraries, methods and objects. Java can also determine the
type of class through a query, making it possible to either dynamically
link or abort the program, depending on the response.
 Java programs support functions written in other languages such as C
and C++. These functions are known as native methods. This facility
enables the programmers to use the efficient functions available in
these languages. Native methods are linked dynamically at runtime.

 Ease of Development
 Java 2 Standard Edition (J2SE) 5.0 supports features, such as
Generics, Enhanced for Loop, Autoboxing or unboxing, Typesafe
Enums, Varargs, Static import and Annotations. These features reduce
the work of the programmer by shifting the responsibility of creating
the reusable code to the complier. The resulting source code is free
from bugs because the errors made by the complier are less when
compared to those made by programmers. Thus, each of the linguistic
features is designed to develop Java programs in an easier way.

 Scalability and Performance


 J2SE 5.0 assures a significant increase in scalability and performance
by improving the startup time and reducing the amount of memory
used in Java 2 runtime environment.
 Memory utilization is reduced by sharing data in the shared archive
among multiple JVM processes. In the earlier versions, the data was
replicated in each JVM instance.

 Monitoring and Manageability


 Java supports a number of APIs, such as JVM Monitoring and
Management API, Sun Management Platform Extension, Logging,
Monitoring and Management Interface, and Java Management
Extension (JMX) to monitor and manage Java applications.
 Java provides tools, such as jconsole, jps, jstat and jstatd to make use
of monitoring and management facilities.

 Desktop Client
 J2SE 5.0 provides enhanced features to meet the requirements and
challenges of the Java desktop users. It provides an improved Swing
look and feel called Ocean. This feature is mainly used for developing
graphics applications that require OpenGL, hardware acceleration.

How Java Differs from C and C++

Although Java was modeled after C and C++ languages, it differs from C and C++
in many ways. Java does not a number of features available in C and C++. For the
benefit of C and C++ programmers, we point out here a few major differences
between C/C++ and Java language

Java and C

Java is not lot like C but the major difference between Java and C is that Java is
and object-oriented language and has mechanism to define classes and objects. In
an effort to build a simple and safe language, the Java team did not include some of
the C features in Java.

 Java does not include the C unique statement keywords sizeof, and typedef.
 Java does not contain the data type struct and union.
 Java does not define the type modifiers keywords auto, extern, register,
signed, and unsigned.
 Java does not support an explicit pointer type.
 Java does not have a preprocessor and therefore we cannot use # define, #
include, and # ifdef statements.
 Java requires that the functions with no arguments must be declared with
empty parenthesis and not with the void keyword as done in C.
 Java adds new operators such as instanceof and >>>.
 Java adds labelled break and continue statements.
 Java adds many features required for object-oriented programming.
Java and C++

Java is a true object-oriented language while C++ is basically C with object-


oriented extension. That is what exactly the increment operator ++ indicates. C++
has maintained backward compatibility with C. Is is therefore possible to write an
old style C program and run it successfully under C++. Java appears to be similar
to C++ when we consider only the “extensions” part of C++. However, some
object -oriented features of C++ make the C++ code extremely difficult to follow
and maintain.

Listed below are some major C++ features that were intentionally omitted from
java or significantly modified.

 Java does not support operator overloading.


 Java does not have template classes as in C++.
 Java does not support multiple inheritance of classes. This is accomplished
using a new feature called “Interface”.
 Java does not support global variables. Every variable and method is
declared within classes and forms part of that class.
 Java does not use pointers.
 Java has replaced the destructor function with a finalize() function.
 There are no header files in Java.
Java also adds some new features. While C++ is a superset of C, Java is neither a
superset nor a subset of C or C++. Java may be considered as a first cousin of C++
and a second cousin of C.

Java and Internet

Java is also most popular language on web because java provides us the facility of
Applets those are used for Creating Graphical Applications From Internet a user
can download any application and Execute in the Applet.
Java and World Wide Web

About the time that the details of Java were being worked out, a second, and
ultimately, more important, factor was emerging that would play a crucial role in
the future of Java. This second force was, of course, the World Wide Web. Had the
web not taken shape at about the same time Java was being implemented, with the
emergence of the World Wide Web. Java was propelled to the forefront of
computer language design, because the web, too demanded portable programs.

Java Environment

Java Environment includes Classes and Several Methods in the Form Packages or
we can also Called them as the Development Tools The Tools those provides us
the Facility to create java Applications are also Known as the java Development
Kit The Development Kit of the java Includes Several Classes and their methods
and properties The Java Development Kit ,name of the Development tools that is
used for creating any applications.

Java Development Kit :


Java Development Kit Comes with a collection of tools that are used for
developing and Running java programs.
1) Javac :- Compiler used for Compiling java programs.
2) Java :- For Interpreting java programs.
3) Appletviewer :- For Running Applets.
4) Jdb:- For Connecting java to Database.

You might also like