20165220 The ninth week study summary

Textbook learning content summary

  • Constructor 1
    try {  URL url = new URL("http://www.google.com");
    }
    catch(MalformedURLException e) {
       System.out.println("Bad URL:"+url);
    }
    
  • Construction method 2: use
    public URL(String protocol,String host,String file) throws MalformedURLException InetAddress
    
  • Use multithreading technology

 

  • URL class: The URL class is an important class in the java.net package. Applications that use URLs to create objects are called client programs. A URL object usually contains the most basic three parts of information: protocol, address and resource.
  • UDP datagram:
    The basic mode of UDP-based communication is:
    package data, called a data packet, and then send the data packet to the destination;
    receive the incoming data packet, and then view the content of the data packet.
  • Java remote call.

Problems and Solving Processes in Teaching Materials Learning

  • Question: How is reading data from a socket connection different from reading data from a file?
  • Solution to the problem: According to the explanation in the textbook, although both are input streams, when reading data from a file, all the data is already in the file; and when using a socket connection, it may be in another Before the data is sent at one end, it has already started to read. At this time, the thread will be blocked, and the thread will continue to perform subsequent operations until the reading method successfully reads the information.

code hosting

Summary of last week's exam mistakes

The basic states of a process are: newly created, running, blocked, and dead.

Reason: The four states of the process explained in the textbook are: new, running, interrupted, and dead. I found that there are 5 states on the network: create, ready, execute, block, and terminate. So there is some confusion.

Understand the situation: blocking and interrupting should be similar states.

comprehension

The content of this week is significantly more than the previous two weeks, and it is new knowledge and new concepts that have not been touched in the past. It takes a certain amount of time to understand, and the coding should be improved step by step.

I am not proficient enough to master these new knowledge, and I hope I can apply it proficiently after spending more time typing code. I think it is very necessary to preview before class. If you don't master it in time, you will be dropped.

There are many, many, and it is the best to move forward with the big team. Pair learning is also the first time to experience the fun. I believe it will get better and better in the future!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324937384&siteId=291194637