• 🤟 blogger introduction: CSDN, Toutiao, Zhihu and other platforms quality bloggers, the whole network fans 2W +
  • 💬 If the article is helpful to you, welcome to follow, like, bookmark (click three links) and subscribe

Looked from the ancient today

Back in 1991, a product called Oak was being planned, aimed at all the popular consumer products of the time (radios, set-top boxes). The launch didn’t go over well, but with the rise of the Internet in 1995, The product found its niche and successfully morphed into the JAVA language.

It is worth mentioning that JAVA is actually the name of an Indonesian island, also called JAVA in Chinese, famous for its coffee. It is said that many programmers enjoy a hot cup of espresso after work (I’m not a big fan, maybe I’m a fake programmer) and get inspiration from it. JAVA stands for serving the world a cup of hot coffee, hence the logo of JAVA in the shape of a steaming cup of coffee.

Oak was a product of the Green Project, led by James Gosling, the father of JAVA. It changed its name to JAVA in 1995 and officially proposed the slogan “Write Once, Run Anywhere” at the SunWord conference. It’s been more than 20 years since the first version of JAVA came out. Let’s look back at what we’ve learned in those years through the timeline below.

As of today (2021-11), JAVA has been updated to JDK17, and from the dense milestones in the timeline image above, we can see how fast JAVA has grown over the years. TIOBE language rankings for November 2021

Note: TIOBE(The TIOBE Programming Community Index) is an indicator of The popularity of Programming languages, ranked based on The number of experienced programmers, courses, and third-party vendors on The Internet, using search engines such as Google, Bing, Yahoo! As well as Wikipedia, Amazon, YouTube and Baidu, ranking data simply reflects the popularity of a particular programming language

Official website: TIOBE

Reasons for JAVA’s longevity

Interview with James Gosling, Father of JAVA

Since the 1.0 version of “Write Once,Run Anywhere” was officially put forward at the Sun World conference in 1995, JAVA has been the Top3 popular programming languages all the year round. Why can JAVA be so popular? Here we come to take stock!

1. Object-oriented programming

The so-called object oriented refers to the process of program development will be the application of the data and operation methods encapsulated into a convenient for us to understand the “object” characteristics, so that we can be easier to understand in the development process, and achieve information encapsulation and modularization.

Simply speaking, a program can be abstracted into a person, a person will have two eyes, a mouth and other properties, can eat, walk and other behaviors, the program can also be abstracted into similar properties and behaviors.

For a more detailed explanation of object-oriented programming, see the previous post on Interface programming

2. Simplicity

If you know or have learned other languages (such as C++), you will know that the syntax of JAVA is generally similar to that of C++. However, some concepts that are difficult to understand and easily confused in C++ are not found in JAVA (such as Pointers). JAVA feels simpler by comparison because it implements these confusing concepts in a clearer, more understandable way (that is, references).

3. Cross-platform

Cross-platform means that programs developed in the JAVA language can run on different software and hardware platforms. The execution of a program eventually need into machine-language instructions that the computer hardware to perform, and the different operating system and computer hardware is differ, so dedicated to a particular computer hardware or software development process directly on another computer hardware is unable to perform (like for adult children’s clothes, burst wear is not enough). At a minimum, porting is required, as some applications compiled on Windows will not run directly on Unix.

To solve this problem, a program language needs to be independent of a specific operating system or hardware. JAVA language is exactly this condition. JAVA introduced the concept of virtual machine, JVM implements JAVA interfaces of different platforms, shielding the differences of underlying hardware. The JAVA compiler programs programs developed in the JAVA language into structure-independent bytecodes (commonly known as class files) that can be executed in the appropriate environment as long as the JAVA Virtual machine is installed.

4. Robustness

Robustness: Commonly understood as the ability of the software (program) to determine that an input outside the specification does not meet the requirements of the specification, and to have a reasonable way to deal with it. For example, the value of a field can only be array and letter, but the user enters Chinese. In this case, the program needs to be able to respond to the input outside the specification (such as indicating that the user input does not conform to the specification), rather than directly report an error or no response.

You go to the ATM to withdraw money, but the ATM freezes after you input your pin number. What should you do? At that time you can request help counter, counter can be understood as a bank for the abnormal situation provides a out, you will certainly to the bank, because if there is no teller, ATM card after the death of you can’t do other things but to wait, want to take back your card may need to wait for bank send special person to do, then the user experience will be very bad, The same is true of programs.

Programs written in the JAVA language have this feature. First, JAVA programs check for possible problems during compilation and runtime to reduce program crashes due to unknown reasons. At the same time, the JAVA language provides an exception handling mechanism, which can prompt unhandled exceptions at compile time or provide a backstop for running exceptions, preventing the program from crashing.

5. Security

JAVA can be said to be a safe network language, it shields the pointer type, the operation of memory through object instances, at the same time, JAVA also in the compilation, interpretation level of security assurance.

Such as: in the build, JAVA will be tested to all kinds of grammar, can not meet the needs of the grammar of writing in compile times wrong cannot be explained, in interpreting layer, on the JAVA program compiled bytecode verifier, at the same time also to convert the code format, type, whether the legal aspects of inspection, to ensure a safety in program execution.

6, support multi-threading

With the development of science and technology, people have higher requirements for software use experience, and response speed is a very important indicator. JAVA has built-in multithreading support, through multithreading, the computer can handle multiple tasks at the same time, because the speed of the processor is much faster than the speed of people to accept information, people will feel the software is very fast response, user experience is very good.

7. Portability

The portability of JAVA is primarily related to its cross-platform (platform-independent) nature, and the class libraries in JAVA implement platform-independent interfaces to make it portable. The JAVA compiler is also written in the JAVA language (see source code: JAVA compiler implementation), and the interpreter is implemented in standard C, so the entire JAVA system is portable.

8. Dynamic

The basic unit in JAVA is the class, which can be customized by the developer, or can reference a third party defined class library. In JAVA, the class is dynamically stoned at runtime, so adding new properties and methods to the class library to disordered recompile the program, so JAVA implements dynamic maintenance of the program and reference class library.

C/C++ generates machine code for the classes and functions used in the corresponding function library or class library during compilation. If new functions are added in the subsequent class library upgrade, the C/C++ program needs to be modified and compiled again to use the new functions in the class library.

9. High community activity and complete documentation

This feature is due to the eight features described above. It is because of the JAVA language’s simplicity and cross-platform features that it attracts a large number of developers, and the high degree of community activity and layer upon layer nesting that JAVA is so popular today.

thinking

Aside from some of the features mentioned above, what do you think are the reasons why JAVA has remained so popular since its introduction? What flaws do you see in JAVA itself? Welcome to leave a comment.


What does JAVA give us?


If you feel that the article is helpful to you, please give the author a thumbs up, favorites, attention, so that the blogger receive feedback, have more power!