Features of Java
There are many features of Java that makes this it incredibly interesting and preferable, namely:
Java programs use the JVM as abstraction and not accessing the operating system straightforwardly. This creates Java programs greatly portable. A Java based program can run unchanged on all supported platforms, e.g., Windows or Linux.
Object-orientated programming language: Except the primitive data types, all the other elements are objects. Java being object oriented means that our software is organized in the as a combination of different types of objects that integrates both data and behaviour.
Some fundamental concept of OOPs:
Strongly-typed programming language:
Java is strongly-typed, for example the kinds of the used variables are pre-defined and translation to other objects is comparatively strict, eg. must be done in most cases by the programmer.
Interpreted and compiled:
Source code of Java is assigned into the bytecode presentation which has no dependency on the target platform. These bytecode commands will be interpreted by the Java Virtual machine. The JVM comprises a Hotspot-Compiler which converts performance critical bytecode commands into native code commands.
Automatic memory management:
Java accomplishes the memory allocation, de-allocation for creating fresh objects. The program does not have straight gate to the memory. The so-called garbage collector involuntarily removes objects to which no lively pointer exists.
Java is secure because of the following reasons:
1.It does not have any explicit pointer.
2.Programs in java run inside a virtual machine sandbox.
3.Concept of Exception handling.
4.Another thing that makes it secure is bytecode.
5. Garbage collection mechanism.
Robust means strong. Java practices strong memory management. There are lack of pointers that circumvents security problem. There is an automatic garbage collection process in java. There is exception handling and type checking facilities in java. All these points makes java as a robust language.
This enables a Java application to execute anywhere on the network, the compiler helps by generating an architecture-neutral object file format and the compiled code is made executable on many processors in the presence of java run-time system.
Java is Portable because the Output of a Java compiler is a Non Executable code which is also known as bytecode. Bytecode is further executed by Java run-time system, which is also known as Java Virtual Machine
Java is known for its High Performance. This is because byte code of Java can be compiled on the fly to code that counterparts C++ in speed using a “just-in-time compiler.” Numerous companies are also working on native-machine-architecture compilers for Java.
A thread can be a separate program, which runs concurrently. We can run Java programs that deal with multi tasks at once by executing multiple threads. The main benefit of multi-threading is that it doesn’t fulfil memory for each thread. Threads plays an important role in multi-media, Web applications etc.