Creates a new Java object and invokes the constructor with given arguments.
创建一个新的Java对象,并调用给定的参数构造。
Details
详情----------Details----------
The new method is used as the high-level API to create new Java objects (for low-level access see .jnew). It returns the newly created Java object.
new方法被用来作为高层次的API来创建新的Java对象(低级别的访问.jnew)。它返回新创建的Java对象。
... arguments are passed to the constructor of the class specified as J("class.name").
...参数传递为J("class.name")指定的类的构造。
方法----------Methods----------
new signature(Class = "jclassName"): ...
newsignature(Class = "jclassName"):...
参见----------See Also----------
.jnew, jclassName-class
.jnew,jclassName-class
举例----------Examples----------
## Not run: [#无法运行:]
v <- new(J("java.lang.String"), "Hello World!")
v$length()
v$indexOf("World")
names(v)