Programming a game is sadly nothing one can learn by copy & pasting code. If you've just started out with Java i'd suggest starting small and working your way upwards. I don't want to discourage you, but it might be very very frustrating to start out with 3D if you are not yet familiar with basic 2D graphics programming concepts.
If you are really new to Java you might consider starting out with basic text adventures to get a feel for designing a game idea and actually implementing it. This also involves getting familiar with programm if you just started out. This includes things like basic control structures, data structures and so on. It also includes things like file i/o, all the mundane things that one would not directly associate with game programming.
If that is to boring you can skip the text adventure part and go for a very simple 2D game, provided you have general programming experience. Usually you'd try to implement an old class like Pong or Breakout. From there
you should have a good enough crasp about general game development that you can focus your learning on aspects like graphics for a while.
3D can be a bit of a bitch at first, especially if you lack the necessary knowledge of linear algebra. Don't get discouraged, it has a steep learning curve, but once you grasp the basics it's extremely satisfying!
The book follows this progression (with the assumption that you already know the basics of Java) so it might well be what you are looking for. The concepts are transferable to any other platform as well!