- Simple – Java is easy to learn and understand. It’s syntax is quite simple. The confusing and ambiguous features of C++ language are either not included or have been implemented in cleaner way. For example, concept of explicit pointers and operator overloading is not there is Java. Another example is that Java has Garbage Collector and there is no need to manually collect un-referenced objects.
- Object oriented – Java is an object oriented language. OOP is a programming language model organized around objects. In OOP, programs are made up of objects which communicate with each other. Objects incorporate both data and behavior.
- Distributed – With Java, computers can easily communicate with each other. With Java it’s very easy to make remote procedure calls and access remote databases. With Java we can write multithreaded servers and also create distributed data systems.
- Multithreaded – Multithreading is executing multiple threads simultaneously. Thread is a single flow of execution. Thread is a lightweight sub-process. Threads share a common memory area and thus context-switching between threads takes less time. Java supports extensive support for multithreading.
- Dynamic – Java has the ability to instantiate classes and call methods at runtime. Classes are linked only as needed. Classes can be add new methods and instance variables without affecting others. It is possible in Java to get the information about a class at runtime.
- Architecture neutral – Java was built for applications running across networks. In a network, various systems having different configurations/architectures and operating systems are connected. In case of Java, the compiler generates an architectural-neutral “binary code format” which is independent of hardware architectures. If Java runtime environment is available for a given hardware and software environment then a Java program can run in that environment. For this no special porting activity is required. Byte code generated by Java compiler is different from machine code. Bytecode is machine-independent, high-level code for virtual Machine.
- Portable – Java program can run on all major platforms. The result of compilation of Java code is .class file, which can run on any Java supported platform without modification.
- Robust – Java language is used to write highly reliable programs. There is no concept of explicit pointers and manual garbage collection. Java language has extensive compile-time checking which is followed by second time run-time checking.
- Secure – Java provides many things to make it more secure. For example, automatic array bounds checking, absense of pointers, automatic memory management and garbage collection. Bytecode verifier ensures that only legitimate code is executed in Java runtime environment. Bytecode verifier checks for language rules, memory management violations, illegal type casting and stack overflows.