Following are the features or buzzwords of Java language which made it popular:
- Simple - Java omits many clumsy and confusing features of otherprogramming languages such as C++. Also, Java is designed to beable to run stand-alone on small machines. The size of the basicinterpreter and class support is 40 KB.
- Secure - Because Java supports the distributed environment of the Internet, it also offers multiple security features. Java provides data security through encapsulation. Also we can write applets in Java which provides security. An applet is a small program which can be downloaded from one computer to another automatically. There is no need to worry about applets accessing the system resources which may compromise security. Applets run within the JVM which protects from unauthorized or illegal access to system resources.
- Portable - There are no implementation-dependent aspects of the language specifications. For example, the sizes of primitive data types and the behavior of the arithmetic on them are specified. This contributes to make programs portable among different platforms such asWindows, Mac, and Unix. Also they can be executed on any kind of computer containing any CPU. When an application written in Java is compiled, it generates an intermediate code file called as “bytecode”. Bytecode helps Java to achieve portability.This bytecode can be taken to any computer and executed directly.
- Object-Oriented - Java supports the features and philosophy of object-oriented programming. So, it supports all the features of object oriented model like encapsulation, inheritance, polymorphism, abstraction, etc
- Robust - A program or an application is said to be robust(reliable) when it is able to give some response in any kind of context. Java provides support for error checking at various stages: early checking at compile time, and dynamic checking at runtime. More features of Java providing robustness include Type Checking and Exception Handling.
- Multithreaded - A thread is a light weight process. Java supports multithreading which is not supported by C and C++. Multithreading increases CPU efficiency. A program can be divided into several threads and each thread can be executed concurrently or in parallel with the other threads. Real world example for multithreading is computer. While we are listening to music, at the same time we can write in a word document or play a game.
- Architecture neutral - The Java compiler compiles the source code into bytecode, which does not depend upon any machine architecture, but can be easily translated into a specific machine by a JVM for that machine.
- Interpreted - The Java compiler compiles the source code into bytecode, which can be executed on any machine by the Java interpreter of an appropriate JVM.
- High Performance - The Just-In-Time (JIT) compilers improve the performance of interpreting the bytecode by caching the interpretations.
- Distributed - Java offers extensive support for the distributed environment of the internet. Java supports distributed computation using Remote Method Invocation (RMI) concept. The server and client(s) can communicate with another and the computations can be divided among several computers which makes the programs to execute rapidly.
- Dynamic - New code can be added to the libraries without affecting the applications that are using the libraries, runtime type information can be found easily, and so on.
Post a Comment