1.

Which is a useful way to try out small and simple Rhino programs and one-liners?(a) Starting an interactive shell(b) Starting a one to one shell(c) Creating a thread to do simple programs(d) Starting a multiple shellThe question was posed to me in an online quiz.My doubt stems from Scripting Java with Rhino topic in section Server-Side and Client-Side Scripting of JavaScript

Answer»

Right answer is (a) Starting an interactive shell

The explanation: Rhino is distributed as a JAR ARCHIVE. Start it with a command line like this :

java -jar rhino1_7R2/js.jar program.js

If you omit program.js, Rhino starts an interactive shell, which is USEFUL for TRYING out simple programs and one-liners.



Discussion

No Comment Found

Related InterviewSolutions