Introduction
This article explains Java, and why we use it. Over 3 Billion Devices use Java. As for computers, approximately 97% of Enterprises Desktops and 89% of PCs, in the U.S., use Java. For mobile phones, 3 Billion cell phones run on Java. Not only computers and mobile phones, but also printers, ATMs, credit cards, home security systems, televisions, and so on use Java. For more, you can open the
link.
Java is chosen for the following reasons.
- Easy to learn: Java was designed for the C++ programmer, because it is derived from C++. The team of Java developers started a big project that will be platform-independent, but they decided to develop a new language. And, if they change the syntax of Java, then it would be difficult to understand a new programming language. That is why it inherits all the features of C and C++. For example, here is a simple program that prints "Hello User":
- class demo {
- public static void main(String args[]) {
- System.out.println("Hello User");
- }
- }
- Secure: Java is secure because it provides Encapsulation and Data Abstraction, by which we can do data hiding. That is how we secure our data. Not only Encapsulation and Data Abstraction, an Applet (it is a small program that runs directly in the web browser) also provides security.
- Free: Believe it or not, people want free stuff. Don't you? But, if we talk about an organization's cost, it is an important factor in the development to create a Java application that you need to pay for, but your idea.
- Documents Support Javadocs! Friends you have no idea about it. I am sure you will be amazed when you read it. It has all the stuff you want, when you learn Java, or when creating an application. It has everything about Java, like how to use a class, what method belongs to which class, and so on.
Here is a link of Javadoc.
- Rich API: It is also one of the best reasons to learn Java, because it has a highly visible and rich API. If we talk about other programming languages, like Turbo C++, it has a simple interface and very poor quality animation capability. But in Java, it has a great interface and very high-quality animation capability.
- Robust: Robustness means that which is strong, powerful, and not affected by others. But, in what sense is Java strong and powerful? Here, robust means reliable and there is no programming language as reliable as Java. It provides a very low chance of error, for the programmer, because of its strong memory allocation, garbage collection mechanism, and exception handling, compared to other programming languages.
- Platform Independent: As I said earlier, the team started a project that will be platform-independent, but they had no resource to make a program platform-independent. That is why Java was born. Now, we can see that if we write a Java program, we can run in any environment, using the JVM.
- Object-Oriented: Object-oriented itself, is a different thing. It depends on class and objects, encapsulation, Inheritance, Abstraction and polymorphism, and Java supports all of the features of OOP. Using OOP, we can break complex code into a modular form and make a fine application, without giving extra effort.
- Multithreaded: Java supports multithreaded. Thread is a lightweight process that helps us to develop a program that can do multiple tasks at a time and it increases CPU efficiency. It is not supported by other programming languages.
- Open Source: Java is also an open-source programming language, by which we can make fast and cost-effective applications easily. And, the reason is, because it has a great framework like Spring, Struts, and so on. Additionally, it has many libraries that are contributed by Google and other organizations.
- High Performance: Java is a high-performance language, because the JVM is very intelligent. When we run a Java program the JVM does not interpret the entire code into machine instructions. It interprets the required code that will be executed. This enhances performance.
- Distributed: Distributed systems are those systems in which resources are shared. This can be done in Java using Remote Method Invocation (RMI). In RMI, there is a server and one or more clients, that can communicate or share resources, in a network area.
- Portable: Java is a portable language, because we can make a program in one computer, compile in another computer, and execute in another computer. Using its platform independence, we can write code in one operating system and execute in another operating system.
- Development Tools: Java has great development tools such as Netbeans, Eclipse and so on, that play a major role in development. Using these tools, we can create our code faster, because it provides help and great debugging capability.
Summary
The summarization of the preceding article is that Java is not only a programming language, but it is also a technology, an enterprises tool (J2EE), a mobile tool (J2ME), and it allows you to play mobile games, as well as online games. It is simple, free, has a rich API, is portable, and distributed. It is also, secure, platform-independent, robust and high performance.