2-Introduction To Java Basics, Types of Java Application and Features-14-Jul-2020Material - I - 14-Jul-2020 - Lecture1-Features - of - Java
2-Introduction To Java Basics, Types of Java Application and Features-14-Jul-2020Material - I - 14-Jul-2020 - Lecture1-Features - of - Java
HISTORY OF JAVA
James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java
language project in June 1991. The small team of sun engineers called
Green Team.
Java is an island of Indonesia where the first coffee was produced (called
java coffee). Java name was chosen by James Gosling while having coffee
near his office.
What is Java?
Application
According to Sun, 3 billion devices run Java. There are many devices where
Java is currently used. Some of them are as follows:
There are mainly 4 types of applications that can be created using Java
programming:
1) Standalone Application
2) Web Application
An application that runs on the server side and creates a dynamic page is
called a web application. Currently, Servlet, JSP, Struts, Spring, Hibernate,
JSF, etc. technologies are used for creating web applications in Java.
3) Enterprise Application
4) Mobile Application
4) JavaFX
Many java versions have been released till now. The current stable release of
Java is Java SE 10.
Version Name
Code Name Release Date
JDK 1.0 Oak January 1996
JDK 1.1 (none) February 1997
J2SE 1.2 Playground December 1998
J2SE 1.3 Kestrel May 2000
J2SE 1.4 Merlin February 2002
J2SE 5.0 Tiger September 2004
JDK 6 Mustang December 2006
JDK 7 Dolphin July 2011
JDK 8 March 2014
JDK 9 September, 21st 2017
JDK 10 March, 20th 2018
JDK 11 September, 25th 2018
JDK 12 March, 19th 2019
JDK 13 September, 10th 2019
Java SE 14 14
March, 17th 2020
15
Java SE 15 Expected in September
2020
Features of Java
The primary objective of Java programming language creation was to make
it portable, simple and secure programming language. Apart from this, there
are also some excellent features which play an important role in the
popularity of this language. The features of Java are also known as java
buzzwords.
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:
1. Object
2. Class
3. Inheritance
4. Polymorphism
5. Abstraction
6. Encapsulation
Platform Independent
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
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
Portable
Java is portable because it facilitates you to carry the Java bytecode to any
platform. It doesn't require any implementation.
High-performance
Multi-threaded
Dynamic
Comparison
C++ Java
Index
Platform- C++ is platform-
Java is platform-independent.
independent dependent.
Java is mainly used for
application programming. It is
C++ is mainly used for
Mainly used for widely used in window, web-
system programming.
based, enterprise and mobile
applications.
Java was designed and created
C++ was designed for
as an interpreter for printing
systems and
systems but later extended as a
applications
Design Goal support network computing. It
programming. It was an
was designed with a goal of being
extension of C
easy to use and accessible to a
programming language.
broader audience.
C++ supports the goto Java doesn't support the goto
Goto
statement. statement.
Java doesn't support multiple
Multiple C++ supports multiple
inheritance through class. It can
inheritance inheritance.
be achieved by interfaces in java.
Operator C++ supports operator Java doesn't support operator
Overloading overloading. overloading.
Java supports pointer internally.
C++ supports pointers. However, you can't write the
Pointers You can write pointer pointer program in java. It
program in C++. means java has restricted
pointer support in java.
Compiler and C++ uses compiler only. Java uses compiler and
interpreter both. Java source
C++ is compiled and run code is converted into bytecode
using the compiler at compilation time. The
which converts source interpreter executes this
Interpreter
code into machine code bytecode at runtime and
so, C++ is platform produces output. Java is
dependent. interpreted that is why it is
platform independent.
Call by Value C++ supports both call Java supports call by value only.
and Call by by value and call by There is no call by reference in
reference reference. java.
Structure and C++ supports structures Java doesn't support structures
Union and unions. and unions.
C++ doesn't have built-
in support for threads. It
Thread Support relies on third-party Java has built-in thread support.
libraries for thread
support.
Java supports documentation
C++ doesn't support
Documentation comment (/** ... */) to create
documentation
comment documentation for java source
comment.
code.
Java has no virtual keyword. We
C++ supports virtual
can override all non-static
keyword so that we can
Virtual Keyword methods by default. In other
decide whether or not
words, non-static methods are
override a function.
virtual by default.
Java supports unsigned right
shift >>> operator that fills zero
unsigned right C++ doesn't support >>>
at the top for the negative
shift >>> operator.
numbers. For positive numbers,
it works same like >> operator.
Java uses a single inheritance
tree always because all classes
C++ creates a new
Inheritance Tree are the child of Object class in
inheritance tree always.
java. The object class is the root
of the inheritance tree in java.
C++ is nearer to Java is not so interactive with
Hardware
hardware. hardware.
Java is also an object-oriented
C++ is an object-oriented
language. However, everything
language. However, in C
(except fundamental types) is an
Object-oriented language, single root
object in Java. It is a single root
hierarchy is not
hierarchy as everything gets
possible.
derived from java.lang.Object.