Java Learning Experience

Source: Internet
Author: User

A summer vacation, two books, let me understand the magic of Java, the tool is as big as my age, but the new, with the computer technology scientists, engineers, the development of Java features more and more perfect. Learning time is not long, but I compare learning, Java and C, C + +, C # compared to learn, a lot of harvest.

Java does not have a visual programming environment, and now a bit unaccustomed, after all, the code to complete these programs is still quite large, but boss told us, Swing, AWT, Bean and other graphical interface design, do not see, skip directly, just wondering, since this technology backward, Why write in the book. However, in fact, after browsing through, these graphical interface design patterns are really very arresting, really curious, how the engineers came.

Best of all, the Java pointer has been encapsulated, do not like C, C + +, over and over the bitter force of the hands of the hand, debug half a day do not know why, because a small pointer, can spend a whole day of time, no longer consider the chain list, queue, stack and other data structures, are encapsulated well, It's a design that benefits.

In the object-oriented nature of Java, the feeling is much better than C + +, with a simple interface concept, Metaclass and other multiple inheritance means to replace C + + inheritance. However, to my surprise, Java actually does not support multiple inheritance! After all, in C + +, a class can often derive many different subclasses from the inheritance, the grandson class. Later, you can use the interface of the class to solve complex tasks without having to know the implementation details. A class can implement one or more interfaces and use objects that implement the corresponding interface at any time where the interface is needed. Understanding the packaging of Java, perhaps it is a rapid popularity of a reason, good encapsulation, so that the code is not easily tampered with.

The concept of the package is really fresh, I put them in the analogy of the header file, library ... Don't want to, because in the same project, can create a lot of new packages, each package can also build a lot of classes, what is the meaning of it, for encapsulation? In order to ensure the uniqueness of the class name, there is no connection between the nested package, the book says.

What happens when the program goes wrong? I am not saying that the programmer knocks the code wrong, but when encountered some more mischievous user, intentionally does not enter the data which we want, causes the program to appear unexpectedly, this is strange who? Of course, the bitter force programmer, so in line with the customer is God's principle, both to consider the user is more naughty, but also care about the computer not proud jiao. Classify exceptions: The error class and the exception class. These are far from satisfying the need for an error and need to create a specific exception class

JDBC, this is the first task boss has assigned me. Although completed, but in the process of writing, there are many questions, first of all, since it is a connected port, is it possible to import this package directly? Then, if you can't import this package, copy the code directly? In addition, it is not possible to complete the creation of the database through the compiler, it needs to be created in MySQL, this, good trouble ah!!! Still have to make additions and deletions to check and change the operation is fixed, can at any time according to user needs to print it? The command line can only write the kind of commands that all databases have to be universal, and the idea persists. The purpose of creating an interface is to be convenient, yet this is far from being a convenient goal.

The application of Java in the cross-border, is called the computer field of the Silk Road, but the world is so large, so much language, the completion of the conversion of these languages is a matter of how the egg hurts Ah, date, time, currency, number format ... Each region has its own characteristics, all of them to set up, to finish these work, very tired ah, is it so hard to cross the border? Isn't it possible that the system has been able to complete these operations?

Security, Java is really harsh to the point of program security. In C, checking the array boundaries is often ignored, but Java never leaves the exploit. Java Three security mechanisms: Validator, security Manager, digital signature, a strict, for malicious offensive code, Java security mechanism, to protect the program is not attacked (in the book, I learned that malicious code attacks mainly to inherit a new subclass, the use of array of boundary vulnerabilities, Through pointers to memory overflow, tampering with the code to modify the purpose of the registry, etc., the digital signature (also known as the developer's identity) also includes message digest, message signature, check signature, certificate signature, the proof program has not been modified by hackers. Very interesting, when you can not fully trust the other party's program, through the third-party certification, to determine the security of the program. It's common in real-life interpersonal communication, where two of strangers pass through a common acquaintance to achieve the purpose of familiarity.

Java can easily open the socket and other operations, you can use the remote method call mechanism to enable the communication between distributed objects. By setting the port number, I used the compiler to access the servers of the National Institute of Technology in the United States. I know the scope of Java wed is so broad that I'm only touching the tip of the iceberg. While understanding the distributed architecture, but because the example given in the book is just one client for a server, through this example, let me know the data exchange between the client and the server, as well as the identity authentication before the communication. In addition, for multiple clients accessing the same server, I wonder if multi-threaded management can be used to achieve the purpose of multiple clients accessing a single server? or to open multiple ports to satisfy the purpose of multiple client access (so the number of client requirements is endless)? Lenovo to a cellular topology network, There are more deficiencies in the introduction of the book.

Another interesting part of Java is the ability to invoke local methods. Code AH, knocking too much will be annoying, Java can be compatible with other languages. Previously knocked over the program, after a little mouse click, the compiler's small operation can be very convenient indeed.

Java water is very deep, any one aspect of the study can find a lot of problems, not only the lack of knowledge, but also the lack of experience.

Java Learning Experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.