The type function loads the specified Java class and provides it as an object.
Fields of this object can be read directly from it, and new instances can be created with the JavaScript new keyword.
Parameters
className: String
Returns any
Example: ```javascript
var BigDec = Java.type('java.math.BigDecimal');
var bd = new BigDec("0.1");
console.log(bd.add(bd).toString());```
The
type
function loads the specified Java class and provides it as an object. Fields of this object can be read directly from it, and new instances can be created with the JavaScriptnew
keyword.