Module 1 - JAVA LANGUAGE
Module 1 - JAVA LANGUAGE
JAVA LANGUAGE
History of Java Programming Language
The name Oak was used by Gosling after an oak tree that remained outside his office.
Also, Oak is an image of solidarity and picked as a national tree of numerous nations like the
U.S.A., France, Germany, Romania, etc. But they had to later rename it as “JAVA” as it was
already a trademark by Oak Technologies.
“JAVA”
Gosling and his team did a brainstorm session and after the session, they
came up with several names such as JAVA, DNA, SILK, RUBY, etc.
Java name was decided after much discussion since it was so unique. The name Java
originates from a sort of espresso bean, Java. Gosling came up with this name while having a
coffee near his office. Java was created on the principles like Robust, Portable, Platform
Independent, High Performance, Multithread, etc. and was called one of the Ten Best
Products of 1995 by the TIME MAGAZINE.
Currently, Java is used in internet programming, mobile devices, games, e-business
solutions, etc. The Java language has experienced a few changes since JDK 1.0 just as various
augmentations of classes and packages to the standard library. In Addition to the language
changes, considerably more sensational changes have been made to the Java Class Library
throughout the years, which has developed from a couple of hundred classes in JDK 1.0 to
more than three thousand in J2SE 5.
1|P age
Object Oriented Programming – JAVA LANGUAGE
JDK
Beta 1995
January The Very first version was released on January 23, 1996. The
JDK 1.0 1996 principal stable variant, JDK 1.0.2, is called Java 1.
“Play area” was the codename which was given to this form and
strictfp keyword
Codename- “KESTREL”
Additions:
2|P age
Object Oriented Programming – JAVA LANGUAGE
RELEASE
Codename- “Merlin”
Codename- “Tiger”
Codename- “Mustang”
name J2SE with ava SE and dropped the .0 from the version
number.
Additions:
3|P age
Object Oriented Programming – JAVA LANGUAGE
RELEASE
Codename- “Dolphin”
Additions:
JAVA SE
Compressed 64-bit pointers.
7 July 2011 Binary Integer Literals.
Upstream updates to XML and Unicode.
8 March 2014 methods and a new date and time API inspired by Joda Time.
JAVA SE September system for the Java SE platform, and to apply that system to the
Addition:
4|P age
Object Oriented Programming – JAVA LANGUAGE
RELEASE
Additions-
JAVA TECHNOLOGY
The Java Development Kit (JDK) is one of three core technology packages used in Java
programming, along with the JVM (Java Virtual Machine) and the JRE (Java Runtime
Environment). It's important to differentiate between these three technologies, as well as
understanding how they're connected:
Developers new to Java often confuse the Java Development Kit and the Java Runtime
Environment. The distinction is that the JDK is a package of tools for developing Java-based
software, whereas the JRE is a package of tools for running Java code.
The JRE can be used as a standalone component to simply run Java programs, but it's
also part of the JDK. The JDK requires a JRE because running Java programs is part of
developing them.
5|P age
Object Oriented Programming – JAVA LANGUAGE
Figure 1 shows how the JDK fits into the Java application development lifecycle.
Used to
JDK Create a
Java
JVM
Program Compiled
Java
Java
Program
JRE Program Run
inside
Just as we did with my recent introduction to the Java Virtual Machine, let's consider the
technical and everyday definitions of the JDK:
In addition to the JRE, which is the environment used to run Java applications, every
JDK contains a Java compiler. The compiler is the software program capable of taking raw
.java files--which are plain text--and rendering them into executable .class files. We'll see the
compiler in action soon. First, I'll show you how to download and setup a JDK in your
development environment.
Features of Java
6|P age
Object Oriented Programming – JAVA LANGUAGE
1. Simple
2. Object-Oriented
3. Portable
4. Platform independent
5. Secured
6. Robust
7. Architecture neutral
8. Interpreted
9. High Performance
10. Multithreaded
11. Distributed
12. Dynamic
Simple
Java is very easy to learn, and its syntax is simple, clean and easy to understand.
According to Sun, Java language is a simple programming language because:
Java syntax is based on C++ (so easier for programmers to learn it after C++).
Java has removed many complicated and rarely-used features, for example,
explicit pointers, operator overloading, etc.
7|P age
Object Oriented Programming – JAVA LANGUAGE
Object-oriented
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
Platform Independent
8|P age
Object Oriented Programming – JAVA LANGUAGE
Java is platform independent because it is different from other languages like C, C++,
etc. which are compiled into platform specific machines while Java is a write once, run
anywhere language. A platform is the hardware or software environment in which a program
runs.
There are two types of platforms software-based and hardware-based. Java provides
a software-based platform.
The Java platform differs from most other platforms in the sense that it is a software-
based platform that runs on the top of other hardware-based platforms. It has two
components:
1. Runtime Environment
2. API(Application Programming Interface)
Java code can be run on multiple platforms, for example, Windows, Linux, Sun Solaris,
Mac/OS, etc. Java code is compiled by the compiler and converted into bytecode. This
bytecode is a platform-independent code because it can be run on multiple platforms, i.e.,
Write Once and Run Anywhere(WORA).
Secured
Java is best known for its security. With Java, we can develop virus-free systems. Java
is secured because:
No explicit pointer
Java Programs run inside a virtual machine sandbox
9|P age
Object Oriented Programming – JAVA LANGUAGE
Java language provides these securities by default. Some security can also be provided
by an application developer explicitly through SSL, JAAS, Cryptography, etc.
Robust
Architecture-neutral
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.
Portable
Java is portable because it facilitates you to carry the Java bytecode to any platform.
It doesn't require any implementation.
10 | P a g e
Object Oriented Programming – JAVA LANGUAGE
High-performance
Java is faster than other traditional interpreted programming languages because Java
bytecode is "close" to native code. It is still a little bit slower than a compiled language (e.g.,
C++). Java is an interpreted language that is why it is slower than compiled languages, e.g., C,
C++, etc.
Distributed
Multi-threaded
Dynamic
11 | P a g e
Object Oriented Programming – JAVA LANGUAGE
Sources
Features of Java
https://www.javatpoint.com/features-of-java
12 | P a g e