Oracles tutorials ( and the hundreds on the web ) usually talk about how to set up a Client Server networking relationship with the help of the java.net package. Delegating a single thread on the server for every connection.
This approach is easy to understand and quite straightforward, I suggest you start there.
If you're looking for super efficiency (1000+ players), you should look into the java.nio package. I had lots of trouble figuring java.nio out on my own. I read the
"Java NIO" book which helped a lot.
Key concepts to remember when doing networking:
1.
Everything you send and receive is in bytes. So learn about bytes.
2.
Protocols.
A Protocol is a set of predefined rules on how data is sent and received between programs. F.ex: If the first byte in a received message is the number 5, then treat the rest of the message (bytes) as text.
For your own game, you'll want to make your own protocol. To communicate with other programs ( http, irc, etc etc ) you will need to learn the protocol by heart. Here's a list of a bunch of used protocols (rfc's)
http://en.wikipedia.org/wiki/List_of_RFCs