DCIT 22 Computer Programming 1 Lecture 3
DCIT 22 Computer Programming 1 Lecture 3
DCIT 22 Computer Programming 1 Lecture 3
TO JAVA
DCIT 22 – Computer
Programming 1
History of Java
The history of Java is very
interesting. Java was originally designed
for interactive television, but it was too
advanced technology for the digital cable
television industry at the time. The history
of Java starts with the Green Team. Java
team members (also known as Green
Team), initiated this project to develop a
language for digital devices such as set-top
boxes, televisions, etc. However, it was
suited for internet programming. Later,
Java technology was incorporated by
History of Java
The principles for creating Java
programming were "Simple, Robust, Portable,
Platform-independent, Secured, High Performance,
Multithreaded, Architecture Neutral, Object-
Oriented, Interpreted, and Dynamic". Java was
developed by James Gosling, who is known as the
father of Java, in 1995. James Gosling and his team
members started the project in the early '90s.
History of
Java
12. JDK 1.0 released in(January 23, 1996). After the
first release of Java, there have been many
additional features added to the language. Now
Java is being used in Windows applications, Web
applications, enterprise applications, mobile
applications, cards, etc. Each new version adds the
new features in Java.
Java Version History
Many java versions have been released till now. The current stable release of Java is Java SE 10.
• JDK Alpha and Beta (1995) – Java Development Kit
• JDK 1.0 (23rd Jan 1996)
• JDK 1.1 (19th Feb 1997)
• J2SE 1.2 (8th Dec 1998) – Java 2 Standard Edition
• J2SE 1.3 (8th May 2000)
• J2SE 1.4 (6th Feb 2002)
• J2SE 5.0 (30th Sep 2004)
• Java SE 6 (11th Dec 2006) – Java Platform Standard Edition
• Java SE 7 (28th July 2011)
• Java SE 8 (18th Mar 2014)
• Java SE 9 (21st Sep 2017)
• Java SE 10 (20th Mar 2018)
• Java SE 11 (September 2018)
• Java SE 12 (March 2019)
• Java SE 13 (September 2019)
• Java SE 14 (Mar 2020)
• Java SE 15 (September 2020)
• Java SE 16 (Mar 2021)
• Java SE 17 (September 2021)
• Java SE 18 (to be released by March 2022)
The Java Programming Language
Following are the notable features of Java:
Object Oriented
In Java, everything is an Object. Java can be easily extended since it is
based on the Object model.
Platform Independent
Unlike many other programming languages including C and C++, when Java
is compiled, it is not compiled into platform specific machine, rather into platform-
independent byte code. This byte code is distributed over the web and interpreted
by the Virtual Machine (JVM) on whichever platform it is being run on.
Simple
• Java is designed to be easy to learn. If
you understand the basic concept of
OOP Java, it would be easy to master.
Secure
The Java • With Java's secure feature it enables to
Programming develop virus-free, tamper-free
systems. Authentication techniques are
Language based on public-key encryption.
Architecture-neutral
• Java compiler generates an
architecture-neutral object file format,
which makes the compiled code
executable on many processors, with the
presence of Java runtime system.
Portable
Being architecture-neutral and having
no implementation dependent aspects of the
specification makes Java portable. The compiler
in Java is written in ANSI C with a clean
portability boundary, which is a POSIX subset.
Multithreaded
With Java's multithreaded feature it is
possible to write programs that can perform
many tasks simultaneously. This design feature
allows the developers to construct interactive
applications that can run smoothly.
Interpreted
Java byte code is translated on the fly to
native machine instructions and is not stored
anywhere. The development process is more rapid and
analytical since the linking is an incremental and light-
weight process.
Language Distributed
Java is designed for the distributed
environment of the internet.
Dynamic
Java is considered to be more dynamic than
C or C++ since it is designed to adapt to an evolving
environment. Java programs can carry an extensive
amount of run-time information that can be used to
The Java Programming Language
With most programming
languages, you either compile or interpret
a program so that you can run it on your
computer. The Java programming
language is unusual in that a program is
both compiled and interpreted. With the
compiler, first you translate a program
into an intermediate language called Java
bytecodes —the platform-independent
codes interpreted by the interpreter on
the Java platform. The interpreter parses
and runs each Java bytecode instruction
on the computer. Compilation happens
just once; interpretation occurs each time
the program is executed. The following
figure illustrates how this works.
The Java Programming
Language
You've already been introduced to the Java VM. It's the base for
the Java platform and is ported onto various hardware-based
platforms.
The Java Platform
The Java API is a large collection of
ready-made software components that provide
many useful capabilities, such as graphical user
interface (GUI) widgets. The Java API is grouped
into libraries of related classes and interfaces;
these libraries are known as packages. Highlights
what functionality some of the packages in the Java
API provide.
Native code is code that after you compile it, the compiled code runs
on a specific hardware platform. As a platform-independent environment, the Java
platform can be a bit slower than native code. However, smart compilers, well-tuned
interpreters, and just-in-time bytecode compilers can bring performance close to that of
native code without threatening portability.
We will learn how to write the simple program of
java.
Creating Hello World Example