I always recommend kev glass' Space invaders Tutorial :http://www.cokeandcode.com/spaceinvaderstutorial
It can be used as "template" and you can understand how a game loop works .
I would not recommend you starting with an online though . The logic can be very different from a networked game .
I would write a simple 2d game to see how it really works . After that you'll have a better vision of how an online game can be implemented .
I know you said you're very intimate to Java, but game programming is something completely different .