Java exercise 10.24, java10.24
Java question 10.24
1,
1, 3. connect () and accept (): These two system calls are used to complete a complete related establishment, and connect () is used to establish a connection. Accept () is used to make the server wait for the actual connection from a customer process. 2. listen (): This call is intended for connection servers, indicating that it is willing to receive connections. Listen () must be called before accept. 4. close socket-closesocket () Close socket s and release the resources allocated to the socket. If s involves an open TCP connection, the connection is released. 2. Transfer of Real parameters of the reference type in java to the form parameter, only the passed reference, rather than the passed object itself. I drew a picture myself, and there is no visio! Draw a picture directly!
3,
Override Principle: The method name is the same. The return type of the same parameter type is smaller than or equal to the return type of the parent class method. If the return type of the subclass is less than or equal to the return type, an exception is thrown, the sub-class access permission is greater than or equal to the parent class method access permission.