Java is one of the most popular languages in the field of software programming. Because of its large number of important and robust features, it is widely accepted in software programming.
- Simple
- Object-Oriented
- Portable
- Platform independent
- Robust and Secured
- Architecture neutral
- Dynamic
- Interpreted
- High Performance
- Multithreaded
- Distributed
Simple & Powerful :
- Java is Easy to write and more readable and eye-catching.
- Java has a concise, cohesive set of features that makes it easy to learn and use.
- Most of the concepts are drawn from C++ thus making Java learning simpler.
Object-oriented :
- Java programming is object-oriented programming language.
- Like C++ java provides most of the object-oriented features.
- Java is not pure OOP Language (while C++ is semi object-oriented)
Basic concepts of OOPs are:
- Object
- Class
- Inheritance
- Polymorphism
- Abstraction
- Encapsulation
Portable
- We may carry the java bytecode to any platform.
Robust and Secure
- Java encourages error-free programming by being strictly typed and performing run-time checks.
- Java program cannot harm other systems thus making it secure.
- Java provides a secure means of creating Internet applications.
- Java provides a secure way to access web applications.
Architecture-neutral
- There is no implementation-dependent features e.g. size of primitive types is fixed.
- In C programming, int data type occupies 2 bytes of memory for 32-bit architecture and 4 bytes of memory for 64-bit architecture. But in java, it occupies 4 bytes of memory for both 32 and 64-bit architectures.
Platform Independent
- Platform=hardware+Operating System
- Java is platform-independent so java program can run on any operating system and any hardware configuration.
- It is because of the magic of the Byte Code which is platform-independent.
- When java compiler compiles any code then it generates the byte code, not the machine native code. This byte code needs a JRE to execute on a machine.
- JRE contains JVM and JVM read that byte code and execute it. Different JVM is designed for different OS and byte code is able to run on different OS.
Multithreaded
- Java supports programming, which allows the user to write programs that perform many functions simultaneously.
- The two or more parts of the program can run concurrently then each part of such a program is called a Thread and this type of programming is called multithreaded programming.
- Each thread defines a separate path of execution. Thus, multithreading is a specialized form of multitasking.
Interpreted :
- Java supports cross-platform code through the use of Java bytecode.
- Bytecode can be interpreted on any platform by JVM.
Dynamic :
- Java programs carry with them substantial amounts of run-time type information that is used to verify and resolve accesses to objects at run time.
High performance
- Bytecodes are highly optimized.
- JVM can execute them much faster.
Distributed
- We can create distributed applications in java. RMI and EJB are used for creating distributed applications. We may access files by calling the methods from any machine on the internet.