BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

Features of Java Programming Language

By Chaitanya Singh | Filed Under: java

Java is one of widely used and popular programming language. Java is packed with full of features, yet it still maintains the simplicity and flexibility that allows a developer to quickly learn and start working on java projects with ease. The flexibility of writing a java code on one machine and running it on several other machine makes it a popular choice in programming world.

On top of that, the regular updates makes it safe and stable choice for the projects that intend to run for a longer period of time. The features of Java are also known as Java BuzzWords.

According to Oracle home page Java is the #1 programming language and development platform with millions of developers running more than 51 billion Java Virtual Machines worldwide.

Features of Java

Following are some of the useful and advanced features of java:

1. Simple

Java is a very simple programming language, it is easy to learn, read and write in Java. The syntax of Java is clean and easy to understand.

Here’s why java is simple programming language compared to other popular programming language:

  • Java syntax is similar to C/C++ so it is easier to learn java if one is familiar with C or C++. However java doesn’t use the complex features of C and C++ such as Pointers, go to statements, preprocessors/ header files, multiple inheritance, operator overloading etc.
  • There is no need to remove unreferenced objects explicitly as there is an Automatic Garbage Collection in Java.

2. Platform Independent

Java is a platform independent language. Compiler(javac) converts source code (.java file) to the byte code(.class file). JVM executes the bytecode produced by compiler. This byte code can run on any platform such as Windows, Linux, Mac OS etc. Which means a program that is compiled on windows can run on Linux and vice-versa.

Each operating system has different JVM, however the output they produce after execution of bytecode is same across all operating systems. That is why we call java as platform independent language.

3. Secure

Security is one of the biggest concern in programming language as these programming langauges are used to develop some of the critical and sensitive applications that needs to be secured such as banking applications. Java is more secure than C/C++ as does not allow developers to create pointers, thus it becomes impossible to access a variable from outside if it’s not been initialized.

We don’t have pointers and we cannot access out of bound arrays (you get ArrayIndexOutOfBoundsException if you try to do so) in java. That’s why several security flaws like stack corruption or buffer overflow is impossible to exploit in Java.

4. Object-Oriented Programming language

Object oriented programming is a way of organizing programs as collection of objects, each of which represents an instance of a class.

4 main concepts of Object Oriented programming are:

  1. Abstraction
  2. Encapsulation
  3. Inheritance
  4. Polymorphism

5. Robust

Robust means reliable. Java programming language is developed in a way that puts a lot of emphasis on early checking for possible errors, that’s why java compiler is able to detect errors that are not easy to detect in other programming languages.

The main features of java that makes it robust are:

  1. Garbage collection,
  2. Exception Handling
  3. Memory allocation.

6. Distributed

Using java programming language we can create distributed applications. RMI(Remote Method Invocation) and EJB(Enterprise Java Beans) are used for creating distributed applications in java.

In simple words: The java programs can be distributed on more than one systems that are connected to each other using internet connection. Objects on one JVM (java virtual machine) can execute procedures on a remote JVM.

7. Multithreading

Java supports multithreading. Multithreading is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilisation of CPU.

8. Portable

As discussed above, java code that is written on one machine can run on another machine. The platform independent byte code can be carried to any platform for execution that makes java code portable.

9. Architectural Neutral

As we know Java is a platform independent language, which means program written and compiled on one machine can run on any other machine having different operating system. Java follows the principle of “Write once run anywhere“

Compiler converts the java file into byte-code and this byte code is machine independent, java virtual machine can easily translate this byte code into machine specific code. This makes java architectural neutral programming language.

10. Dynamic

Java is a dynamic programming language. OOPs allows developers to add new classes to the existing packages, add new methods to the existing classes as well as modifying the method without changing the original method code by using the concept of method overriding.

All these features make java dynamic. It also allows classes to be loaded on demand. It also supports functions from its native languages such as C and C++.

12. Performance

Java is significantly faster than other traditional interpreted programming languages. Compiled java code which is known as byte code is like a machine code, that allows a faster execution. Java uses Just in Time compiler which can execute the code on demand, this allows to execute only the method that is being called, which makes it faster and efficient.

Also java uses the concept of multithreading, which allows concurrent execution of several parts of the code at the same time. This provides high performance.

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.

❮ History Of JavaC++ vs Java ❯

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Java Tutorial

Java Introduction

  • Java Index
  • Java Introduction
  • History of Java
  • Features of Java
  • C++ vs Java
  • JDK vs JRE vs JVM
  • JVM - Java Virtual Machine
  • First Java Program
  • Variables
  • Data Types
  • Operators

Java Flow Control

  • Java If-else
  • Java Switch-Case
  • Java For loop
  • Java while loop
  • Java do-while loop
  • Continue statement
  • break statement

Java Arrays

  • Java Arrays

OOPs Concepts

  • OOPs Concepts
  • Constructor
  • Java String
  • Static keyword
  • Inheritance
  • Types of inheritance
  • Aggregation
  • Association
  • Super Keyword
  • Method overloading
  • Method overriding
  • Overloading vs Overriding
  • Polymorphism
  • Types of polymorphism
  • Static and dynamic binding
  • Abstract class and methods
  • Interface
  • Abstract class vs interface
  • Encapsulation
  • Packages
  • Access modifiers
  • Garbage Collection
  • Inner classes
  • Static import
  • Static constructor

Java Exception Handling

  • Exception handling
  • Java try-catch
  • Java throw
  • Java throws
  • Checked and Unchecked Exceptions
  • Jav try catch finally
  • Exception Examples
  • Exception Propagation

Collections Framework

  • Collections in Java
  • Java ArrayList
  • Java LinkedList
  • Java Vector
  • Java HashSet
  • Java LinkedHashSet
  • Java TreeSet
  • Java HashMap
  • Java TreeMap
  • Java LinkedHashMap
  • Java Queue
  • Java PriorityQueue
  • Java Deque
  • Comparable interface
  • Comparator interface
  • Collections Interview Questions

MORE ...

  • Java Scanner Class
  • Java 8 Features
  • Java 9 Features
  • Java Conversion
  • Java Date
  • Java Multithreading
  • Java I/O
  • Java Serialization
  • Java Regex
  • Java AWT
  • Java Swing
  • Java Enum
  • Java Annotations
  • Java main method
  • Java Interview Q

Copyright © 2012 – 2022 BeginnersBook . Privacy Policy . Sitemap