Features of Java
Simple, small and familiar
Java is a simple small language. The syntax of java is just like C++ language. So it is very easy to learn. But programming in java is easier than C++ because
1.It does not use header files
2.It eliminates the use of pointers
3.It eliminates operator overloading and virtual base classes.
4.So Java is a simple object oriented language. Since Java is a small language we can write software that can run on small computers.
Java is a pure object-oriented language. Everything in Java is an object. All programs and data reside inside objects and classes. Object models in Java are simple and easy to extend.
Java has strong networking facilities. So using Java we can create applications on networks. Using Java we can open and use the applications on the Internet. This facility helps the users from different places to work together on a single application.
In many other languages, attention is not given to memory management or exceptional behavior of a program in different situations. So most programs failed. But these issues are clearly dealt in java using the techniques called garbage collection and exception handling.
Since java is used for the programming on the internet, security becomes an important issue. Before a java code from the internet is interpreted, a security check is applied on it. This ensures that the java code does not contain any unwanted elements like a virus.
Java compiler generates an architecture neutral or platform independent code called bytecode. These codes can be run in any type of system.
Java compiler generates a code called bytecode and this code can be used by any machine. In java, the size of the primitive data types is machine independent. So java is a portable language.
Compiled and interpreted
Generally, computer languages are either compiled or interpreted. But java combines both compiler and interpreter. So java is a two stage system.
Java compiler generates a machine independent code called bytecode. These codes are not machine codes. But java interpreter generates machine code from bytecode that can be directly executed by the machine that is running the java program.
Since java interpreter uses bytecodes, the performance is high. The speed is also comparable to other languages like C, C++.
Multithreaded and interactive
Multithreaded means handling more than one job a time. Java supports multithreading. Java also supports constructing interactive programs.
Dynamic and extensible
Java is a dynamic language. So it is capable of linking dynamically new classes, methods, and objects. Java also supports functions written in other languages such as C and C++. These functions are called native methods. During run time native methods can be linked dynamically.