Java is not JavaScript. Update your tags.
Christopher Shaffer
1

In this particular case you are using the nashorn engine to run a javascript code inside of java. Javascript is not only used for DOM manipulation when rendering content over the web. Cheers.