It is important to ensure that the server is running before you try to run the telnet client. The server should display a message to indicate that it is starting up, and some further messages when the client connects and when the server closes down.
There is no special significance in using port 3000 - any port number could have been used, although it is normally best to avoid numbers in the range 0-1023 some of which are conventionally used for standard services. If you omit the port number from the telnet command, then telnet defaults to trying port 23, which in this case will not work.
You can experiment with using other port numbers by editing the PORT_NUMBER constant in the class HelloServer. You must of course use the same port number when running the telnet client.
Instead of typing localhost in the telnet command, you can also use the special IP address, 127.0.0.1, the so-called loopback address, that we met in Activity 9.3. This is the special IP address which always refers to the local host computer. The telnet program always accepts either symbolic addresses or numerical IP addresses.