I am also a beginner in Java.
I am going through Java 2 Black Book.
You may get doubts when going through any particular book. If you have doubts or if the program did not run as you expected you can write your problem/doubt (http://www.javaranch.com/ )in this forum. Many experts all over the world are there to help you.
Cheers !!!!