Java was invented by James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike Sheridan at Sun Microsystems, Inc. in 1991. It took 18 months to complete the first working version of Java.
Introduction to
Java
• Java was invented by James Gosling, Patrick
Naughton, Chris Warth, Ed Frank and Mike Sheridan at Sun Microsystems, Inc. in
1991. It took 18 months to complete the first working version of Java.
• This language was initially called as Oak but
was renamed as Java in 1995.
• Java is purely an object oriented programming
language as its supports various features like Classes, Objects, abstraction,
inheritance and polymorphism.
Java is
getting popular because of its features. Following is a list of buzzwords that
makes Java a popular programming language.
• Simple
• Secure
• Platform independent
• Object
oriented
• Distributed
• Portable
• High performance
• Robust
• Multithreaded
• Interpreted
• Dynamic
Let us
discuss these features in detail.
1. Java is simple and small programming
language
• Java is a simple programming language. Even
though you have no programming background you can learn this language
comfortably.
• The
programmers who worked on C or C++ can learn this language more efficiently
because the syntax of Java resembles with C and C++.
• In
fact Java is made more clear and adaptable than C++.
2. Java is robust and secure
• Following
are reasons that make Java more secured than other programming languages
1. Java
does not support the concept of pointers directly. This makes it impossible to
accidentally reference memory that belongs to other programs or the kernel.
2. The
output of Java compiler is not executable code but it is a bytecode. The
instructions of bytecode is executed by the Java Virtual Machine(JVM). That
means JVM converts the bytecode to machine readable form. JVM understand only
the bytecode and therefore any infectious code can not be executed by JVM. No
virus can infect bytecode. Hence it is difficult to trap the internet and
network based applications by the hackers.
3 In
programming languages like C or C++ the memory management is done explicitly by
the user. That means user allocates or deallocates the memory. Whereas in java
its automatically done using garbage collection. Thus user can not perform the
memory management directly.
4. If an
applet is executing in some browser then it is not allowed to access the file
system of local machine.
3. Java is a platform independent and portable
programming language
• Platform independence is the most exciting
feature of Java program. That means programs in Java can be executed on variety
of platforms. This feature is based on the goal - write once, run anywhere, and
at anytime forever.
• Java supports portability in 2 ways - Java
compiler generates the byte code which can be further used to obtain the
corresponding machine code. Secondly the primitive data types used in Java are
machine independent.
4. Java is known as object oriented programming
language
• Java is popularly recognised as an object
oriented programming language.
• It
supports various object oriented features such as data encapsulation, inheritance,
polymorphism and dynamic binding.
• Everything
in Java is an object. The object oriented model of Java is simple and can be
extended easily.
5. Java is multithreaded and interactive
language
• Java supports multithreaded programming which
allows a programmer to write such a program that can perform many tasks
simultaneously.
• This
ultimately helps the developer to develop more interactive code.
6. Java can be compiled and interpreted
• Normally
programming languages can be either compiled or interpreted but Java is a
language which can be compiled as well as interpreted.
• First, Java compiler translates the Java
source program into a special code called bytecode. Then Java interpreter
interprets this bytecode to obtain the equivalent machine code.
• This
machine code is then directly executed to obtain the output.
7. Java is known for its high performance,
scalability, monitoring and manageability
• Due to
the use of bytecode the Java has high performance. The use of multi-threading
also helps to improve the performance of the Java.
• The
J2SE helps to increase the scalability in Java. For monitoring and management
Java has large number of Application Programming Interfaces(API).
• There
are tools available for monitoring and tracking the information at the
application
level.
8. Java is a dynamic and extensible language
• This language is capable of dynamically
linking new class libraries, methods and objects.
• Java also supports the functions written in C
and C++. These functions are called native methods.
9. Java is a designed for distributed systems
• This
feature is very much useful in networking environment.
• In
Java, two different objects on different computers can communicate with each
other.
. • This
can be achieved by Remote Method Invocation (RMI). This feature is very much
useful in Client-Server communication.
10. Java can be developed with ease
Object Oriented Programming: Unit I: Introduction to OOP and Java : Tag: : - Introduction to Java (Java Buzzwords, features)
Object Oriented Programming
CS3391 3rd Semester CSE Dept | 2021 Regulation | 3rd Semester CSE Dept 2021 Regulation