1. what is rhino ??
Rhino is a javascript interpreter which use java language to develop.
In rhino you can import java package and call java package.
2. rhino shell
you can enter js, and type help() to view the function.3. rhino print
can use print("expression") function;4. rhino input
var readln = (typeof readline === 'function') ? (readline) : (function() {
importPackage(java.io);
importPackage(java.lang);
var stdin = new BufferedReader(new InputStreamReader(System['in']));
return function() {
return String(stdin.readLine()); // Read line,
}; // force to JavaScript String
}());
Reference:
input
output
沒有留言:
張貼留言