Features of Java
Posted May 20, 2011on:
- What are the features of Java?
- What are the key features of Java?
- Which features are supported by Java?
- What Object Oriented Features (OOPs features) of Java?
Following are the key features of the Java Programming Language :-
- Platform Independent
- Object Oriented
- Compiled & Interpreted
- Automatic Garbage Collection
- Built in Networking
- Dynamic Operations
- High Performance
- Free From
- Free Editor
- Case Sensitive
Platform Independent :
The concept of Java is “Write Once, Run Anywhere”. Here the term platform refers to the operating system, to run any java program we need JVM (Java Virtual Machine) and is not dependent on any of the tools & components provided by the operating system, therefore Java is platform independent.
It is simple to understand i.e. user can write & update the code easily since many syntaxes are similar to C & C++, hence they are familiar too. Java also eliminates the several poor programming features of C & C++ like goto statements, header files, structures, operator overloading, multiple inheritance and pointers.
Object Oriented :
Java is based on the concepts on Object Oriented Programming Language such as Inheritance, Encapsulation, Polymorphism, Dynamic Binding, etc.
The Java is strongly typed & allows the Java Compiler checks the program whether there any error and the Java Interpreter checks any run time error and makes the system secure from crash. These features make the java language robust.
Java supports different network connectivity such as HTTP, & FTP. They are also built in Java.
The java language portable provided that the system must have interpreter for the JVM. Java also have the standard data size irrespective of operating system or the processor.
Java does not use memory pointers explicitly. Programs run inside the virtual machine sandbox. Bytecode verification process in Java to ensure that the code loaded over the network does not violate Java security constraints such as;
- No memory pointers
- Array index limits
- Access restrictions, etc.
Java supports multithreading. Thread is nothing but the Lightweight process. When two or more than two threads runs concurrently, then they are said to be Multithreaded. Java also support synchronization of threads.
Compiled & Interpreted :
Java requires two steps to run a program;
- Compilation &
The Java Compiler (javac) compiles the java code & produces the bytecode. The file generated after successful compilation containing the bytecode is known as Class file (“.class”) or Byte Code File.
The generated class file is then interpreted by the Java Interpreter (java) which gives the output.
Automatic Garbage Collection :
Java supports automatic memory management, it is done by JVM.
Built in Networking :
Java support networking as of it was designed keeping networking in mind & has many classes which help to create network & internet applications very easily.
Dynamic Operations :
Java supports various dynamic operations on demand such as;
- Linking of files from all over the world
- Loading of new classes & libraries
- Compilation of classes & libraries, etc.
High Performance :
Java uses native code & “just-in-time compiler” which converts the bytecode to machine code & since java is interpreted it gives high performance.
Free Form :
It is a free form language i.e. we can write multiple statements in a single line.
Free Editor :
It is free editor language i.e. we can edit Java programs in Notepad, Text pad, Dos editor, WordPad, VI editor, etc.
Case Sensitive :
Java is a case sensitive language i.e. it differs in small letters & capital letters.
All the above are the main features of the Java programming language.