This is the very first step of our course and Introduction to Java Programming language and we are going to learn the basics of Java and its features.
Java is very popular and famous among the Developers due to its performance, robustness, and wide range of libraries meant for developing enterprises applications.
1. What is Java Programming language?
Java is a programming language developed by James Gosling in 1995 at Sun Microsystem and later acquired by Oracle.
Java is an extension language of C++ because it follows many of the concepts of the old school languages (C & C++).
It is popularly known for WORA concept i.e Write Once Run Anywhere.
You just have to write your code once and with the help of Java Virtual Machine(JVM), you can run your code cross-platform (Windows, macOS, Linux).
Over time, new versions of Java have been released by Oracle. The latest version of Java is 17.
It is used for developing web applications, mobile applications ( android apps ), Desktop applications, Web server and application servers, Games, Database connection and much more.
2. Why use Java?
- Java is cross-platform (Windows, macOS, Linux).
- Open source and FREE (paid for commercial purpose from JAVA 8).
- Easy to learn.
- Secure, Fast and Powerful.
- Huge Community Support
3. Features of Java Programming language
3.1. Object-Oriented Programming Language:
All elements in Java programming language are treated as Object excepts the primitive data types.
In Java, Object is the most important part as well as in OOPs concept because it improves code reusability and performance with any compromising security.
3.2. Platform Independent:
This is the feature which makes Java stand different from the crowd. Java virtual machine (JVM) makes Java platform-independent.
Therefore, Java code is translated to bytecode with the help of Java compiler and JVM enables a Java program to run on any other operating system.
Java is easy to learn and based on OOPs concept which makes it easier if you are familiar with concepts of Object-Oriented Programming.
- JVM makes it secure because Java code is first compiled to bytecode and then executed by JVM which ensures the security of your code.
- There is no use of pointers like C/C++ in Java and there is no chance of memory leakage if any other program gets to know the pointer value.
- Java Exception handling helps the programmer to capture a sequence of error in the program which helps to get rid of application crashes.
- Garbage collection also helps Java to be more secure because it prevents freezing of memory in JVM for unusable code.
3.5. Dynamic and High Performance:
Java is a high-performance language due to its dynamic behaviour. Therefore, a Java program can transfer lots of run time information to resolves accessibility of Objects.
4. Benefits of Java Programming Language
- Object-Oriented Language
- Highly Productive
- Fast, Reliable, Secure, Robust
- 90% of companies from FORTUNE 500 uses JAVA.
- Great Community Support
- A large number of open-source libraries
- Used for Android Development.
5. Cons of Java Programming Language
- Difficult Look and Feel
- Complex Syntax
- Slightly slower and more memory consuming then C and C++.
Official Java Docs: Read here