Java learning experience and java experience

Source: Internet
Author: User

Java learning experience and java experience

One summer vacation, two books showed me the magic of Java. This tool is as old as me. However, with the development of computer technology scientists and engineers, java functions are becoming more and more perfect. I have not studied for a long time, but I have learned a lot by comparing Java with C, C ++, and C.

Java does not have a visual programming environment like VS. It is still a bit difficult to get used to. After all, the amount of code to complete these programs is quite large, but Boss told us, swing, AWT, Bean and other graphical interface design, don't look at it, skip directly, just wondering, since this technology lags behind, why should it be written into the book. However, as a matter of fact, after browsing it, the design patterns of these graphic interfaces are really urgent and curious about how the engineers came from that year.

The best thing is that Java pointers have been encapsulated and don't have to be like C and C ++. I 've been playing with pointers over and over again, so I don't know why debug has been around for a long time, A small pointer can take a whole day and no longer consider data structures such as linked lists, queues, stacks, and so on. It is a good design.

In Java's object-oriented features, it feels much better than C ++. It uses simple interface concepts, metaclass, and other multi-inheritance methods to replace the multi-inheritance of c ++. However, I am surprised that Java does not support multi-inheritance! After all, in C ++, a class can often derive many different child classes by inheritance. You can use the class interface to solve complex tasks without having to know the implementation details. A class can implement one or more interfaces and use the objects that implement the corresponding interfaces at any time where an interface is required. I have learned about Java encapsulation, which may be one of the reasons for its rapid popularity. Good encapsulation makes the code hard to be tampered.

The concept of package is really fresh. I think of them as header files, libraries ...... I don't want to, because in the same project, many packages can be created, and each package can have many classes. What is the significance? For encapsulation? The book says that to ensure the uniqueness of the class name, there is no connection between nested packages.

What if a program error occurs? I'm not talking about the programmer's mistake in coding. But when some naughty users intentionally do not input the data we want, this will lead to program exceptions. Who is the blame? Of course, it is hard to force programmers, so in line with the principle that customers are God, we must consider how naughty users are, but also care about computers. Exception classification: Error and Exception. These are far from meeting the requirements for error reporting. You also need to create a specific exception class.

JDBC, which is the first task assigned to me by the Boss. Although it is done, there are many questions in the compilation process. First of all, since it is a connection port, can't we directly import this package? Next, if the package cannot be imported, will the code copy be useless? In addition, you cannot create a database through the compiler. You need to create a database in mysql. This is very troublesome !!! The addition, deletion, query, and modification operations are fixed. Can I print them as needed at any time? Command lines can only be used to write the commands that all databases have. This idea has always existed. Creating an interface is convenient, but it is far from convenient.

The Application of Java across national borders can be called the Silk Road in the computer field, but it hurts to complete the conversion of these languages because the world is so large and there are so many languages, date, time, currency, numeric format ...... Each region has its own characteristics and must be configured one by one. It is very tiring to finish these tasks. Is it so hard to cross border? Can't the system complete these operations?

Security, Java is really harsh on program security to the point where it can be added. In C, the array boundary check is often ignored, but Java will never leave this opportunity. Java provides three security mechanisms: the checker, security manager, and digital signature. Each of them is strict, and the Java security mechanism protects programs from attacks (in the book, I understand, malicious Code attacks are mainly used to inherit a new subclass, exploit the array boundary vulnerability, overflow the memory through pointers, and tamper with the code to modify the Registry ), the digital signature (that is, the developer's identity) also includes the message digest, message signature, verification signature, and certificate signature. It proves that the program has not been modified by hackers. It is interesting that, when you cannot fully trust the program of the other party, you must pass third-party authentication to determine the security of the program. This is common in real-life interpersonal communication. Two strangers are familiar with each other through a common acquaintance.

Java allows you to easily open a socket and other operations. You can use a remote method call mechanism to enable communication between distributed objects. By setting the port number, I used a compiler to access the servers of the National Institute of Technology. I know how wide Java Wed is. I am only in touch with the tip of the iceberg. Although I have learned about the distributed structure, the example in the book is just a server that corresponds to a client. Through this example, I can see the data exchange link between the client and the server, and identity authentication before communication. In addition, if multiple clients access the same server, can I use multi-threaded management to access one server from multiple clients? Or is it possible to open up multiple ports to meet the access needs of multiple clients (in this case, the number of clients is endless )? The introduction in the book is even more inadequate when it comes to cellular topological networks.

Another interesting thing about Java is that you can call local methods. It will be annoying to think too much about the code. Java can be compatible with other languages. After a few clicks on a program that has been knocked on before, it is very convenient for a small compiler operation.

Java has a lot of water, so you can find a lot of problems, not just lack of knowledge, but also lack of 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.