I think we should clean up a misunderstanding here:
Javsscript has very little to do with Java. It is two completely different languages and Sun has later regretted that they allowed the java-script developers to use that name because it has caused so much confusion.
This is a Java forum. Not a java-script forum. Reading a book on java will not solve your problems in Javascipt.