Online Java Compiler By
JavaTpoint.com
import java.io.IOException; import java.net.MulticastSocket; public class JavaMulticastSocketsetLoopbackModeExample1 { public static void main(String[] args) throws IOException { MulticastSocket ms1 = new MulticastSocket(); // setLoopbackMode() method ms1.setLoopbackMode(true); System.out.println("Loopback mode : " + ms1.getLoopbackMode()); } }
Output