0% found this document useful (0 votes)
15 views8 pages

Java and DS - Chapter 1

Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1991, designed for platform independence and ease of use. It has evolved through various versions since its inception, introducing features like applets, multithreading, and robust security measures. Java is widely used for web applications and is characterized by its simplicity, portability, and dynamic capabilities.

Uploaded by

dummy.dummymh
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)
15 views8 pages

Java and DS - Chapter 1

Java is a high-level, object-oriented programming language developed by Sun Microsystems in 1991, designed for platform independence and ease of use. It has evolved through various versions since its inception, introducing features like applets, multithreading, and robust security measures. Java is widely used for web applications and is characterized by its simplicity, portability, and dynamic capabilities.

Uploaded by

dummy.dummymh
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/ 8

UNIT - I

THE HISTORY AND EVOLUTION OF JAVA


1
1.1 Introduction

 Java is a General-Purpose, High-Level Object-Oriented Programming language


developed by Sun Microsystems of USA in 1991.
 It is a simple programming language. Java makes writing, compiling, and debugging
programming easy. It helps to create reusable code and modular programs.
 Java code can run on all platforms that support Java. Java applications are compiled
to byte code that can run on any Java Virtual Machine. The syntax of Java is similar
to C/C++.
 Java is currently one of the most popular programming languages in use, particularly
for client-server web applications.
1.2 History of Java
 Java is invented by James Gosling, Patrick Naughton, Chris Warth, Ed Frank,
and Mike Sheridan at Sun Microsystems, Inc. in 1991. Java is related to C++, which is
inherited from the language C. The character of Java is inherited from C and C++
language. It took approx. Eighteen months to develop the first working version. It was
first named as ―Oak‖ but was renamed as ―Java‖ in 1995.
 The basic idea behind creating this language is to create a platform-independent
language that is used to develop software for consumer electronic devices such as
microwave ovens, remote controls, etc. Initially, it was not designed for Internet
applications.
 Java had an extreme effect on the Internet by the innovation of a new type of
networked program called the Applet. An Applet is a Java program that is designed to
1.2 The History and Evolution of Java

be transmitted over the internet and executed by the web browser that is Java-
compatible. Applets are the small program that is used to display data provided by the
server, handle user input, provide a simple function such as calculator etc.
 Java solves the Security and the portability issue of the other language that is being
used. The key that allows doing so is the Bytecode. Bytecode is a highly optimized set
of instruction that is designed to be executed by the Java Virtual Machine (JVM). Java
programs are executed by the JVM also helps to make Java a secure programming g
language because the JVM contains the application and prevents it from affecting the
external systems.

1.3 Evolution of Java

Version Release Date Features


JDK Beta 1995 —

JDK 1.0 January 1996 This is the first stable version.


In this version, added many new library elements,
redefined the way of handling events, and reconfigured
JDK 1.1 February 1997 most of the libraries of 1.0 and deprecated some features
defined by 1.0. Added inner class, JavaBeans, JDBC,
RMI, JIT (Just In time) compiler.
Added support for many features, such as Swing and
J2SE 1.2 December 1998 Collection Framework. The methods suspend(),
resume() and stop() of Thread class were deprecated.
A very small improvement, as it just improved the
J2SE 1.3 May 2000
development environment.
It added some upgrades such as the new keyword assert,
chained exception and a channel-based I/O subsystem.
J2SE 1.4 February 2002
Also added some feature to the collection framework
and the Networking classes.
The significant new features added to this version are –
Generics, Annotation, Autoboxing and Auto-unboxing,
J2SE 5.0 September 2004
Enumeration, for-each, variable-length argument, Static
import, Formatted I/O, Concurrency utilities.
In this version the API libraries and several new
Java SE 6 December 2006 packages got enhanced and offered improvements to the
run time. It supports JDBC 4.0.
Java and Data Structures 1.3

Added JVM support for dynamic language, String in the


switch, Automatic resource management in try-
Java SE 7 July 2011
statement, support for underscore in integers, binary
integer literals etc.
Added Date and time API, Repeating annotation,
Java SE 8 March 2014
JavaFX.
Added Java platform module system update, jshell,
Java SE 9 September 2017 XML Catalog, jlink, and the JavaDB was removed from
JDK
Added features are local variable type interface,
Java SE 10 March 2018 Application class data sharing, Garbage collector
interface, etc.
Feature added: Dynamic class file loader, HTTP client,
Java SE 11 September 2018 and Transport layer security. JavaFX, Java EE, and
CORBA modules have been removed from JDK.
Added Microbenchmark Suite, JVM Constant API, One
Java SE 12 March 2019
AArch64 Port, Default CDS Archives etc.
Z Garbage Collector enhancements, application class-
Java SE 13 September 2019 data sharing, and previews of switch expressions and
text blocks.
Includes new capabilities such as JDK Flight Recorder
Java SE 14 March 2020 event streaming, pattern matching, and switch
expressions.
Includes update to standard Java Features text blocks,
Java SE 15 September 2020 hidden classes, the Z Garbage Collector, and previews
of pattern matching and records.
Upgrade of standard Java include primitive classes,
Java SE 16 March 2021 sealed classes, records, a vector API, and ports for
Windows on ARM64 and Alpine Linux.

1.4 JavaApplets and Applications

 Java can be used to construct two kinds of programs: Applications and Applets.

 An Application is a program that runs on our computer, under the operating system of
that computer. That is, an application created by Java is more or less like one created
using C or C++. When used to create applications, Java is not much different from any
other computer language.
1.4 The History and Evolution of Java

 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.

1.5 Features of Java

 Java is a truly object-oriented language.


 The features of Java are also known as Java buzzwords.
 The important features of Java are as follows:
1. Simple
2. Secure
3. Portable
4. Object-Oriented
5. Robust
6. Multithreaded
7. Architecture-Neutral
8. Interpreted
9. High Performance
10. Distributed
11. Dynamic
1. Simple
 Java is one of the simplest programming languages to learn.
 The Java programming language retains many of the features of C++ and removes the
unnecessary complexities like Pointers, Operator Overloading and Multiple
Inheritance of C++.
 Syntax of Java is very similar to C and C++ that enables C/C++ programmers to
migrate easily to Java platform.
2. Secure
 Java is highly secure. The Java interpreter verifies the byte code before executing it.
 If the byte code runs out to be invalid, it will not be executed at all. Java does not
allow programmers to interact with the memory of the system. I.e. one cannot write a
Java and Data Structures 1.5

Java code that accesses the memory of the system.


3. Portable
 The ability of software to run on different processors is referred to as portability. The
Java system was built to be portable.
 Java programs are the same on every platform. The feature Write-Sonce-run-
anywhere (WORA) makes the Java language portable provided that the system must
have interpreter for the JVM.
4. Object-Oriented
 Java is an Object-Oriented Programming language. It has all OOP features such
as Abstraction, Encapsulation, Inheritance and Polymorphism.
 Object-Oriented Programming (OOPs) is a methodology that simplifies software
development and maintenance by providing some rules.
5. Robust
 Robust simply means strong. Java is robust because:
 It uses strong memory management.
 There is automatic garbage collection in java which runs on the Java Virtual
Machine to get rid of objects which are not being used by a Java application
anymore.
 There are exception handling and the type checking mechanism in Java. All these
points make Java robust.
6. Multithreaded
 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.
 Multithreading works the similar way as multiple processes run on one computer.
7. Architecture-Neutral
 Java is architecture neutral because there are no implementation dependent features,
for example, the size of primitive types is fixed.
1.6 The History and Evolution of Java

 In C programming, int data type occupies 2 bytes of memory for 32-bit architecture
and 4 bytes of memory for 64-bit architecture. However, it occupies 4 bytes of
memory for both 32 and 64-bit architectures in Java.
8. Interpreted
 Java is an interpreted language.
 Java programs can be executed directly on any machine, which has the Java interpreter
known as the Java Virtual Machine and where the run-time environment has been
ported.
9. High Performance
 Java provides high performance with the use of “JIT – Just In Time compiler”, in
which the compiler compiles the code on-demand basis, that is, it compiles only that
method which is being called. This saves time and makes it more efficient.
 Bytecodes generated by the Java compiler are highly optimized, so Java Virtual
Machine can execute them much faster.
10. Distributed
 Java is distributed because it encourages users to create distributed applications.
 RMI (Remote Method Invocation) and EJB (Enterprise Java Beans) are used for
creating distributed applications.
 This enables multiple programmers at multiple remote locations to collaborate and
work together on a single project.
11. Dynamic
 Java programs are dynamic.
 A Java program consists of many modules and when they undergo any changes, the
dynamism of Java avoids problems caused by change of code used in a program.
1.6 Java and C++
 Java is a true object-oriented language while C++ is basically C with object-oriented
extension.
 Some major C++ features that were intentionally omitted from Java or significantly
modified are:
 Java does not support Operator Overloading.
Java and Data Structures 1.7

 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 a class 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.
1.7 Java and Internet
 Java is strongly associated with the Internet because of the fact that the first
application program written in Java was HotJava, a Web browser to run applets on
Internet.
 Internet users can use Java to create applet programs and run them locally using a
―Java-enabled browser‖ such as HotJava.
 They can also use a Java-enabled browser to download an applet located on a
computer anywhere in the Internet and run it on his local computer.
1.8 Java and World Wide Web
 World Wide Web (WWW) is an open-ended information retrieval system designed to
be used in the Internet’s distributed environment. This system contains what are
known as Web pages that provide both information and controls.
 Java was meant to be used in distributed environments such as Internet. Since, both the
Web and Java share the same philosophy, Java could be easily incorporated into the
Web system.
 With the support of Java, the Web has become more interactive and dynamic. Java
communicates with a Web page through a special tag called <APPLET>.
1.8 The History and Evolution of Java

Exercises:

1. What is Java?
2. Write short notes on History of Java.
3. Discuss briefly about the Evolution of Java.
4. What do you mean by Java ―Applets‖ and ―Applications‖?
5. Explain the Features of Java.
6. Distinguish between Java and C++.
7. Write short notes on Java and Internet.
8. Write a brief note on Java and WWW.
****************************

You might also like