I am reading this article 《Javascript: the most misunderstood language in the worldThe best JavaScript book is JavaScript the definitive.
Guide, 5th edition. CHM, So I downloaded the book, which is called "register for Java". It is an open-source Java package that can operate JavaScript through Java.
I personally think that this can also be used, especially for saving the source code, because Javascript is now written in the Java program, and the Java program will be compiled at the time of release, if the user does not see the source code without using a special tool, but JavaScript does not, it will all be loaded into the browser. However, this is both a benefit and a disadvantage. If you have a good design skill that I need, and my use will not hurt your rights and interests, so I can only look far away, because I can't see your source code. Javascript is an auxiliary tool that makes interactive operations more convenient. Although Java has powerful functions, some functions are hard to implement in Java or are not implemented in that way, but the source code needs to be protected, you can use this tool.
However, using this will also bring us a headache, that is, getting familiar with something, which will take us some time. After all, time is limited, it is impossible for us to learn infinite knowledge in a limited life, and selection is the best. Apart from being non-essential, there is no need to implement JavaScript simply on the page, put it in Java. After all, it is easier.