No, they are two completely different computer languages. Only their names are similar. If you want to learn about Java instead, we have a whole other resource section on Java
the supplied code into the required places in your web page.
also can reformat your script to make errors easier to spot.