In the theory part, you saw the code below to create a server on the given IP address with a specified port:
InetAddress localAddress = InetAddress.getByName("127.0.0.1");
HttpServer server = HttpServer.create(new InetSocketAddress(localAddress, 8080), 0);
Actually, there are other ways of doing it. Explore all the overloads of the create() method and the InetSocketAddress constructor to find which options are correct to create a server.