Java MulticastSocket joinGroup() MethodjoinGroup(InetAddress mcastaddr) is the method of MulticastSocket class. This method is used to join multicast group. The behavior of the group can be affected by setInterface or setNetworkInterface. SyntaxParametermcastaddr - It is the multicast address to join the group. ThrowIOException - This exception occurs while there is error while joining or the address is not multicast address or the platform does not support multicasting. SecurityException - This exception occurs if a security manager exists and its checkMulticast method doesn't allow the join. Example 1Test it NowOutput: Group joined using joinGroup method.... Next TopicJava MulticastSocket |
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