Features of Java Language

  • Every programming language provides some facilities or services which are called features of that language.
  •  java language provides the following various features. 
Features of java

1. Simple:

  • The Java programming language is called a simple programming language because of the following reasons.

  1.    complex topics like pointers, templates, virtual functions, and friend functions, are eliminated in Java language making it simple.
  2.     The syntax of Java language is simple to read, and understand and we can easily implement it in the application which is similar to syntaxes of C, and C++.

2. Architecture Neutral or Platform Independent:

  • When an application is developed in Java language if it can be executed in any machine without considering the operating system, without considering the Architecture, without considering the software and hardware etc.

Translators: a translator is a program that is used to translate or convert user instructions of the program into machine-understandable instructions so that we can execute our program.

  • we have the following 3 types of translators.

1. Interpreter: Interpreter who will translate the program line by line of the program.

2. compiler: the compiler will translate the program all lines of the program at a time.

3. assembler: assembler will translate assembly language instructions into machine instructions line by line.

C language does not support this Platform Independent.

  • When we compile C or C++ programs then compiler will generate .exe files which contain machine instructions.
  • This compiled code or .exe file can be executed only in compatible machines.
  • But If we execute the same .exe file in another incompatible machine it can not be executed hence we can call c or C++ applications are platform or machine dependent.

  • When we compile a Java program then Java compiler will generate byte code instructions.
  • Byte code instructions are not machine instructions.
  • Byte code instructions are special Java instructions that are ready to convert into machine instructions.
  • we can execute this byte code instruction in both compatible and incompatible machines by taking the help of JVM(java virtual machine)hence java applications are called platform-independent apps.

3. Portable:

  • Java language can be called a portable language because using Java language can develop reusable components and applications that can be modified.

4. Interpreted:

  • Java language is called an interpreted language because to execute the Java applications in addition to the Java compiler we require a Java interpreter called JVM.

 5. High performance:

  • In earlier versions of Java software, java compilation is faster than execution time.
  • To improve the performance of Java people introduced JIT (Just in Time) compilers as a part of JVM.
  • It means now Java applications are executed by both compiler and interpreter which will reduce the execution time there by providing high performance.

6. Object-oriented language:

  • Java language is called an object-oriented language because everything in Java is based on a class and an object. In every object-oriented language, we can contain the following 2 components.

      1.   Object

  • Anything that exists physically in the real world can be considered an object.
  • Java language is called as an object-oriented language because everything in Java is based on a class and an object. -In every object-oriented language we can contain the following 2 components.
  •  Every object will contain some properties and some actions.
  •  Properties can be used for describing the object by priviing some data.
  •  Actions represent the task performed by an object

      2.   Class

  •  A class can be considered as a model or blueprint or a plan for creating objects.
  • Using a class we can create any number of objects.
  • Object creation is not possible without a class.
  • A class is a collection of common features of a group of objects.
  • A class does not exist physically.
  • Ex: Class: Cricketer.
  • Object: sachin, dhoni, raina,khohli.

7. Robust:

  • Java language is called as Robust or strong programming language because of the following reasons.

       1. Memory management: 

  •   In Java language there will be no wastage of memory during the allocation time.
  •  all the unused memory will be automatically deallocated by using a special Java program called garbage collector so that memory can be allocated to another program therefore we can say that Java follows efficient memory management.

      2. Exception Handling:

  •  Sometimes while executing the Java program there is a chance of getting run time errors or exceptions. Which will terminate the program in the middle of the execution which means incomplete execution and abnormal termination of the program.
  • But Java language provides huge support by providing keywords and predefined programs to handle the exceptions.

8. Distributed:

  • Java language is called a Distributed language because using Java we can develop distributed applications which are nothing but web-based applications.
  • Every application requires information to be retrieved from different machines available in different locations this is possible with the help of distributed apps.
  • the main advantage of distributed apps improving the performance of the application by making the data more accessible and more available.

9. Multithreading:

  • Java language is called a multi-threading language because java language we can develop an application by following a multi-threading approach.
  • the main advantage of multi-threading is achieving multi-tasking which means Executing multiple tasks at the same time simultaneously which will improve the Performance.

10. Secured:

  • Java language is called a secured language because Java language by default provides some security programs using which we can make our data secure.

11. Dynamic:

  • Java language is called a dynamic language because in Java the memory allocation will be done dynamically as execution time.

Post a Comment

* Please Don't Spam Here. All the Comments are Reviewed by Admin.