Why learn Java

zhaozj2021-02-16  49

[Technical Short]

Why learn Java?

If you often play a computer, you may know that Java is an operational platform, not a island of coffee or Indonesia. In these five years after Java technology, Java turned into a noun in Lang Lang's top, some of which were fact, and some were exaggerated. You may want to know: You should not go to learn Java, I am sure to give you the answer, please listen to my statement.

What is JAVA?

What do you have to know about Java? When people mention "Java", they may be:

Java Program Language: A object-oriented language similar to C or SmallTalk. Learning Java Program Languages ​​Similar human language, there are sets of rules and grammar.

Java Virtual Machine (JVM): Used to perform a Java program. JVM has many platforms, computers, Linux and Windows. With JVM, Java programs can be implemented on different platforms, which is called "written once, everywhere can be implemented."

Java APIS (refers to a library programming interface): It is a set of predefined categories that can be used directly in your program. These things are free, the feature contains images like file access, network read and write, graphical interface, and more.

When people mention "learning Java", they usually refer to the Java language and API. Everyone may know much about JVM, although there is basic understanding of JVM is very helpful to Java learning.

Object Guide Design

Object-oriented programming has been widely accepted, overlying traditional program guide design. Object-oriented programming brings many additional power, but the learning curve of the object-oriented learning curve is also steep. If you already know a set of object-oriented languages, then you learn Java will easily.

If you don't understand the object-oriented design, you have a long journey that you must experience. In myself, I spent about four years of light, I realized the essence of the object-oriented, but the four years of learning is quite accrued. If you are in a good teacher's class, or being buried in a bunch of good books, it may be enough for a few months. Don't derogate the learning of the object-oriented concept, because Java syntax is good, but it is not easy to write a good object orientation.

Some are technical, some are non-technical. I first describe the characteristics of the two programs (garbage collection and exception processing), then I tell you: Why is Java almost a must-have skill in the field of programming. I will also tell you information about Java development tools and their attractive price.

Thank God, "garbage collection" is really good!

Using C , you may write a process of making a machine; if you use Java, the situation is very different. The number one bug of the C program is a mistake of memory configuration. The programmer of C is hard, and you must directly configure a memory. This memory must also be actively returned. This sounds simple, it is not easy, so C procedures will often deplete memory. Java is different. Although you still need to actively configure memory, this memory will be automatically released once it is no longer used, which is called "Garbage Collection". The garbage collection mechanism makes a lot of easy writing programs, although the efficiency is slightly deteriorated, but the impact may not feel at all.

Exception handling mechanism makes the program more stable

No matter what the programming language can easily write a very bad program, but it is not easy to use Java to write a bad program. One of the reasons is garbage collection, the second is the "exception processing mechanism". Good programmers write procedures should be normal when some unexpected conditions occur. What should I do if the file cannot be opened? What should I do if I have a problem when I read a half? If you are using C or other languages, you may be negotiated and do not perform the processing of these unexpected conditions. You may argue: "I just try to see if I can do this, I will return to the head later to change the program more." However, the result is usually: After the program is executed, you will be busy writing new programs, so I have forgotten the incomplete part of the back. After all, I will still break out, you still have to face a mess. Java forced you to prepare your way in a place where you have problems. Java's Method can throw out the exception, which is used to notify the caller program, which is a quite a good mechanism. Even if your program is to open the file, you must write an exception handling method in the program. Java everywhere

Java can be seen everywhere, this is a great advantage. If you are a living by writing programs, you may get back to Java sooner or later. Java has gradually penetrated into various fields, you can write Java servlets, hang it on the Apache or other web server, you can write the Java Applet, execute on the web browser. You can even write the Stored Procedure of the database with Java, and then install it to Oracle 8i. I bet, colleagues who use Java you will gradually get more. Since 1997, many universities have used Java to replace C as the language of programming teaching. As a result, Java has become a language that the programmer is working. If you learn that the only benefits of Java bring you are convenient and colleagues, it is also worth it. Finally, I want to mention: "Write once, you can implement it everywhere." The early version of Java (1.0 and 1.1) can't be completely cross-platform, but now it is much now. If you want to spread a program to multiple platforms, you don't want to rewrite most of the program, Java is a great choice. Java 2 can now be executed on Linux, many UNIX, and Windows. The Java of Macos 9 is still in the 1.1 era. However, the next-generation operating system OS X of Apple is unix as core, which makes the process of transplanting software simplify. I don't know why Apple official said, but in March this year, I have already seen Java 2 above OS X Developer Release 3. I am very confident, Java 2 will be able to execute on Linux, OS X, and Windows, which has covered most of the computer world.

Java free

Sun offers Java-related tools that allow you to develop and perform Java programs. You don't have to pay the license fee, you don't have to spend money to buy Java development tools. Of course, SUN has had their own wishful abacus, and Scott McNealy (Sun's boss) can't wait to conquer the world, but no matter what, our business can enjoy Java without paying for anyone. Moreover, Java's API is a precious treasure that allows us to easily write powerful programs. Want to write a network program? Already have an API! Want to connect the database? Already have an API! Want to write a GUI program? Already have an API! Or want to do digital image processing, music file processing, string, digital signage? There is API! As a programmer, there are so many good APIs really happy, these Java APIs let us not have to "re-invent the wheel", and there are many efforts. Java has such a broad, standard, advanced API, which is simply letting C programmers taboo. C programmers often take time to learn some C category libraries (more MFC), then come to Linux to learn another set (because there is no MFC on Linux). Once you have learned a Java API, where there is no change, no need to learn. Finally, Java's information files can be obtained for free from the website. If you have a network and have time, you can learn objects directly through your network learning objects, Java languages, and Java API. Sun put a lot of great online textbook on the website. If you are used to reading a book, there is a bunch of Java books on the market, you can refer to (for example, I wrote Learning Java). Sunbathing

Java is more interesting than other languages. There are many "anti-retentating devices" in the Java programming, so you will not write a big mistake in the program, so you can write the program soon, and if you use other languages, you must spend more time. A interesting data shows that it is four to ten times more than other languages ​​with Java. I know that this is incredible, but you can ask the people who have learned Java to see. Don't spend a lot of time to find bug, means you can rest for a long time on the beach, means you can accept sunbathing instead of "Skybath". Buy a pair of sun glasses for yourself with Java for yourself!

转载请注明原文地址:https://www.9cbs.com/read-25265.html

New Post(0)