20165329 "Java Programming" ninth week learning summary
Textbook learning content summary
Chapter 12 URL Class
Constructor 1
try { URL url = new URL("http://www.google.com"); } catch(MalformedURLException e) { System.out.println("Bad URL:"+url); }
- Constructor 2:
public URL(String protocol,String host,String file) throws MalformedURLException InetAddress
Get the address with a class - Get the host address on the InetAddress, use the static method getByName(String s)
- To get the local machine address, use the static method getLocalHost()
- socket
- ServerSocket objects and server-side sockets
Use multithreading technology
Datagram
通过网络传输的数据的基本单元,包含一个报头(header)和数据本身,其中报头描述了数据的目的地以及和其它数据之间的关系。
java remote call
[code hosting]
(screenshot of the running result of the statistics.sh script)