Java Features

Rumman Ansari   Software Engineer   2022-03-02   12585 Share
☰ Table of Contents

Table of Content:


The innovator of Java wanted to design a language which could offer solutions to some of the problem encountered in modern programming. They wanted the language to be not only reliable, portable and distributed but also simple, compact and interactive. Sun microsystem officially describes Java with the following attributes:

  • Compiled and Interpreted
  • Platform Independent and Portable
  • Object-Oriented
  • Robust
  • Secure
  • portable
  • Distributed
  • Architecture-Neutral
  • Familiar, Simple and Small
  • Multithreaded and Interactive
  • High Performance
  • Dynamic and Extensible

Compiled and Interpreted

computer language is either compiled(c programming) or interpreted. Java combines both these approaches thus making Java a two-stage system.Java compiler (javac) translates source code into bytecode instructions.when a program is compiled to an intermediate form (bytecode) and then interpreted by a virtual machine(JVM).Thus we can say Java is both compiled and Interpreted.

Platform Independent and Portable

Java is platform independent(that is, architecture-neutral), meaning that you can write a program once and run it on any computer. platform-independent language that could be used to produce code that would run on a variety of CPUs under differing environments.

Object-Oriented

Object-oriented programming (OOP) is a programming language model organized around objects rather than "actions" and data rather than logic. Historically, a program has been viewed as a logical procedure that takes input data, processes it, and produces output data. Java is true object oriented programming language. Almost everything in Java is an object.All program code and data reside within object and class.

Robust

Java is a robust language. It provides many safe grounds to ensure reliable code.The program must execute reliably in a variety of systems. Thus, the ability to create robust programs was given a high priority in the design of Java.It has strict compile time and runtime checking for the data type.It has better memory management system.Java also interprets the concept of exception handling.

Secure

Security is the most important part of every language which is used as programming on internet.Java has better security for every purpose. Java system not only verifies all memory access but also ensure that no viruses are communicated with an applet.In java memory locations can not be accessed without proper authorization.

Portable

Being architecture-neutral and having no implementation dependent aspects of the specification makes Java portable.We may carry the java bytecode to any platform.

Distributed

Java is designed for the distributed environment of the Internet because it handles TCP/IP protocols.This is mainly designed for network application. It has the ability to share both data and programs.Java enables multiple programmers at multiple remote locations to collaborate and work together in a single program.

Architecture-Neutral

Java compiler(javac) generates an architecture-neutral object file format(byte code), which makes the compiled code(byte code) executable on many processors, with the presence of Java Runtime Environment(JRE).The bytecode is similar to machine instructions but is architecture neutral and can run on any platform that has a Java Virtual Machine (JVM). The goal of Java is: "write once; run anywhere, anytime, forever."

Familiar, Simple and Small

Familiarity is another striking feature of java. Because Java inherits the C/C++ syntax and many of the object-oriented features of C++, most programmers have little trouble learning Java.Java was designed to be easy for the professional programmer to learn and use effectively.It is also a small and simple language for that Java eliminates pointers, preprocessor header files etc.learning Java will be even easier and it requires very little effort.

Multithreaded and Interactive

Java was designed to meet the real-world requirement of creating interactive, networked programs.Multithreading means handling multiple tasks simultaneously. It supports multithreaded programs, which allows you to write programs that do many things simultaneously. For this feature, we need not wait for the application to finish one task before beginning another. For example, we can listen to any song while doing any program at the same time we can download any file from the internet.so this is an example of multi threading and an interactive performance.

High Performance

Java performance is impressive for an interpreted language. Java allows us for the creation of cross-platform programs by compiling into an intermediate representation called Java bytecode.Java is faster than c/c++ because in Java bytecode can be executed on any system that implements the Java Virtual Machine(JVM). Java architecture is designed to reduce overheads during runtime.

Dynamic and Extensible

Java is dynamic language because it is capable of linking in new class libraries, methods, and objects.

it is extensible because it supports native methods(methods which are written in another language like c/c++).Native methods are linked dynamically at runtime.