Java programming language (JAVA) was designed by James Gosling on May 23, 1995 (equal to June 2, 1374). Java has always been the first or second programming language in the world since 2001, according to Tobie’s website.
As far as Java is concerned, it all started in the early 1990s, when Sun Microsystems started developing a better version of C++ that could be easily portable, beginner-friendly, and Address automatic memory management. The company’s research led to the creation of an entirely new language, the name of which was chosen from among dozens of suggested names in its introduction meeting room. Today, the Java logo in the form of a steaming coffee cup has become a universal symbol of programming.
In this article, we will do a complete and comprehensive review of this programming language
What is Java?
Java is a multipurpose and object-oriented programming language that is very similar to C and C++; But it is easier to use and it is possible to build powerful programs with it. Of course, the definition provided by Sun Microsystems in 2000 is perhaps more expressive than the above definition:
Java is a simple, object-oriented, network-friendly, interpretable, robust, secure, architecture-independent, portable, high-performance, multithreaded, and dynamic computer language.
In the following, we will examine each of the above characteristics separately:
Java is a simple language
Java was originally modeled on the basis of C and C++ languages, removing some confusing features. These features include pointers, multiple implementations of inheritance, and operator overloading, which were removed in Java. One of the features that does not exist in C++ or C; But one of the basic features of Java is the possibility of memory recycling (garbage-collection), which automatically removes useless objects and arrays.
Java is an object oriented language.
Java’s object-oriented focus has made developers who use the language use it to solve a problem. This situation has led to the distinction between Java and C. For example, if you want to write a program for a bank account, in Java you only need to save the bank account object; But in C, you have to independently program the account status (account balance) and behaviors such as deposit or withdrawal.
Java is a network based language.
Java’s extensive network library makes it easier to work with Transmission Control Protocol/Internet Protocol (TCP/IP) and network protocols such as HTTP (Hypertext Transfer Protocol) and FTP (File Transfer Protocol) and to make network connections easier. Is. In addition, Java programs can access objects over the TCP/IP network, through URLs, and this access is as simple as accessing the local file system.
Java is an interpreted language
A Java program runs at runtime indirectly through a virtual machine (which is a software representation of a hypothetical platform) and its associated runtime environment mediated by an infrastructure platform (such as Windows or Linux). This virtual machine translates bytecodes (instructions and associated data) into platform-specific instructions through interpretation. Interpreting is the act of identifying the meaning of instructions and then selecting platform-specific instructions to execute. Next, the virtual machine executes these platform-specific instructions. This interpretive feature of Java has made it easier to debug Java programs. Because most of the information at compile time actually exists in the runtime environment. Interpretiveness of Java also makes it possible to delay the connection between different parts of the Java program until the execution time, and this problem increases the speed of program development.
Java is a strong language.
Java applications must be reliable as they are used in both consumer and mission-critical applications, ranging from Blu-ray players to car navigation or air traffic control systems. Features of the Java language that make it robust include declarations, data type rechecking once at compile time and again at runtime (to avoid version mismatches), real arrays with automatic bounds checking, and pointer dereferences.
Java is a secure language
Java programs are used in distributed environments. Since Java applications can run on various network platforms, it is important to secure these platforms against malicious code that can spread viruses, steal bank card information, or perform malicious actions. Features that make the Java language robust include deprecating pointers, which work in conjunction with security features such as Java’s secure sandbox model and public key cryptography. Together, these two types of features prevent viruses and other malicious code from affecting dubious platforms. Java is theoretically safe; But in practice, various security vulnerabilities have been identified and exploited. As a result, companies are constantly releasing security updates for Java.
Java is an architecture free language
Networks connect platforms with different architectures of microprocessors and operating systems. Java cannot be expected to create platform-specific instructions and expect these instructions to be understood by all types of platforms that are part of the network. Instead, Java creates platform-independent bytecode instructions that are easy to interpret for any platform (through its JVM implementation).
Java is a portable language
Lack of dependence on architecture has made Java portable. However, the portability of Java is more than the fact that bytecode instructions are platform independent. For example, consider that the size of the integer type will be the same on different platforms. For example, a 32-bit integer type, regardless of whether it is processed on platforms with 16-bit, 32-bit, or 64-bit registers; However, it is signed and occupies 32 bits of memory. Java libraries also help make it portable. When necessary, these libraries provide data types that connect Java code to platform-specific capabilities in portable ways.
Java is a multithreaded language
Java supports the concept of multithreading to improve the performance of applications that execute multiple tasks at once. For example, a program that manages a graphical user interface (GUI) while waiting for input from a network connection uses another thread instead of the GUI thread for this wait. In this way, the graphical interface of the program is still responsive. Java’s synchronization initiatives allow threads to exchange data between themselves without any destructive effects.
Java is a high performance language
The interpretive feature of Java has made it perform well, which is more than sufficient in most cases. For very high-performance applications, Java uses just-in-time compilation, that is, it analyzes interpreted bytecode instructions and compiles high-frequency interpreted instructions into platform-specific instructions. Subsequent attempts to interpret these bytecode instructions result in the execution of the same platform-specific instructions, thereby improving software performance.
Click on the word Java for more information