20165325 "Java Programming" ninth week learning summary

1. Teaching material study notes

ch13

1. URL class

  • The URL class is an important class in the java.net package. An instance of URL encapsulates a uniform resource locator. An application that uses URL to create an object is called a client program.
  • A URL object usually contains the most basic three parts of information: protocol, address, resource.

2. Sockets: methods related to mysocket:

  • getInputStream()get an input stream;

  • getOutputStream()get an output stream
  • Use getInputStream()the resulting input stream to connect to another DataInputStreamdata stream
  • Use getOutputStream()the resulting output stream to connect to another DataOutputStreamdata stream

3. UDP datagram: The basic mode of communication based on UDP is:

  • Data is packaged, called a packet (like a letter is put into an envelope), and the packet is sent to its destination.
  • Accept packets from others (like receiving envelopes), and then look at the contents of the packets.
  • send packets

4. Broadcast datagram

  • Class D address: 224.0.0.0~224.255.255.255.
  • Hosts that want to broadcast or receive broadcasts must all be joined to the same class D address.

2. Code cloud link

Code cloud link

3. Screenshot of script running


Problem encountered: SDK not found

In fact, this is about Android Studiosomething, which I will put in this blog for now.

After just installing Android Studioit, an error code appeared when I opened it once:

unable to access android sdk-on list

In the teacher's blog guide, let us download the SDK. In fact, we can Android Studiodownload it ourselves, so you only need to click in the picture below cancel.

Reference link: unable to access android sdk add-on list

Guess you like

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