JAVA #2 - Main Features of JAVA

Venkata Seshu
2 min readMay 4, 2021

Everything in java, is represented in Class as an object including the main function

Platform Independent: Compiler converts source code to bytecode and the JVM executes the bytecode generated by the compiler. This bytecode can run on any platform be it Windows, Linux, macOS which means if we compile a program on windows, then we can run it on Linux and vice versa. Each operating system has a different JVM, but the output produced by all the OS is the same after the execution of bytecode. That is why we call java a platform-independent language.

Object-Oriented Programming Language: Organising the program in the terms of collection of objects is a way of object-oriented programming, each of which represents an instance of the class.

The four main concepts of Object-Oriented programming are:

  • Abstraction
  • Encapsulation
  • Inheritance
  • Polymorphism

Simple: Java is one of the simple languages as it does not have complex features like pointers, operator overloading, multiple inheritances, Explicit memory allocation.

Robust: Java language is robust that means reliable. It is developed in such a way that it puts a lot of effort into checking error as early possible, that is why the java compiler is able to detect even those errors that are not easy to detect by another programming language. The main features of java that make it robust are garbage collection, Exception Handling, and memory allocation.

Secure: In Java, we don’t have pointers, and so we cannot access out-of -bound arrays i.e it shows ArrayIndexOutOfBoundsException if we try to do so. That’s why several security flaws like stack corruption or buffer overflow is impossible to exploit in Java.

Distributed: We can create distributed applications using java programming language. Remote Method Invocation and Enterprise Java Beans are used for creating distributed applications in java. The java programs can be easily distributed on one or more systems that are connected to each other through an internet connection.

Multithreading: Java Supports multithreading. It is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU.

Portable: As we know, java code written on one machine can be run on another machine. The platform-independent feature of java in which its platform-independent bytecode can be taken to any platform for execution makes java portable.

--

--