Java is a popular general-purpose, high level, modern programming language and computing platform. It is fast, reliable, secure and dynamic, with the ability to fit the needs of virtually any type of application. It is Platform Independent, that means user only need to write program once and it can be run on number of different platforms such as Windows, Mac OS, and the various versions of UNIX.
It was created by James Gosling from Sun Micro-systems (Sun) in 1991. It was first publicly released in 1995 with the version of Java (Java 1.0). According to Oracle, Java runs on 3 billion devices worldwide.
Nowadays, Java is used almost in every field that is desktop to web applications, mobile application, in gaming consoles, cell phones to the Internet, data connection, servers and in many more.
Main Features of Java:
- Object Oriented
- Platform Independent
- Simple and secure
- High Performance
- Compiled and Interpreted
Lets Learn them Individually
- Object Oriented: Java is an object-oriented programming language. OOP divide the program into a number of objects and make it simpler. These Object has some data and behavior which is used in flow of data from one function to another. User can easily extend java as it is based on Object Model. Therefore understanding OOP is an important steps to learn Java Programming. Basic concepts of OOPs are:
- Platform Independent: Unlike other programming language such as C, C++ etc, which require specific platform to be compiled where as Java is compiled into byte-code and this byte-code is Platform Independent. This means Java is only required to write-once and can be run on any platform such as Windows, Linux, Mac OS etc. This byte-code is interpreted by the Java Virtual Machine (JVM).
- Simple and secure: Java is very easy to learn, clean and easy to understand. Java language is a simple programming language because of it’s C++ syntax. Java is also best known for the security that it provides and enable us to develop virus-free systems. it is secured because java programs runs inside virtual machine sandbox.
- Portable: As mentioned above, the byte-code is Platform Independent and can be carried to any other platform for execution of Java program that makes Java code portable.
- Robust: Robust means strong. Java is strong and reliable because of it’s ability for early checking for errors, mainly on compilation error and run-time checking.
- Dynamic: Since Java is designed to adapt to an transformed environment ,it makes java dynamic. it is considered to be more dynamic than C or C++. Java supports dynamic loading of classes and compilation and garbage collection.
- Multi-threaded: This feature in Java allows the Java to perform more than one task at once by defining multiple threads for maximum utilization of CPU. The advantage of the use of Multi-threaded is that it does not required to occupy space in memory for each thread instead it shares the common memory space.
- High Performance: Java enabled High performance by introducing JIT- Just In Time compiler, that is the compiler only compile the code or method that is called, making compilation process faster and consume less-time.
- Compiled and Interpreted: Java has both Compiled and Interpreted feature where the compilation feature allows to create byte code after compilation. And after, the byte codes are converted into Machine Language with the help of Interpreter. Hence both the features are required for the execution of Java Code.
- Distributed: Java is distributed because it allows the users/developers to create distributed applications that are design to run on computer networks. RMI(Remote Method Invocation) and EJB(Enterprise Java Beans) are used for creating distributed applications. In other words, this feature allows the user to access the files from any machine that are connected to each other on the internet.