URL class
java.net covers sockets, URLs, addresses. Socket = endpoint for TCP communication.
URL/URLConnection fetch remote resources.
Always handle IOException.
Write one tiny example for URL class. Compile, print one result, and say the output out loud before you type.
Use URL class only when the problem needs it. Don’t force it into every program. Know one beginner trap.
Let's take this on the board with one tiny Main class — no extra files. URL class — prints local machine host name and IP — basic networking API. Start from main, go line by line, and stop at each print. That output is the proof for URL class.
Client socket needs host + port.