Java Socket isConnected() methodThe isConnected () method of Java Socket class returns the connection state of the socket. This method would continue to return the connection state which was there before being closed. SyntaxParameterNA ReturnThe isConnected () method would return a Boolean value 'true' if the socket has been successfully connected to a server. Example 1Test it NowOutput: The socket is connected: true The socket is bounded: true Example 2Test it NowOutput: The Socket is connected: true The socket is bounded: true Next TopicJava Socket Class |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India