Skip to content, Skip to search

Changes

Jython Scripting

No change in size, 10:40, 30 January 2011
m
Creating multi-dimensional native java arrays
arr = array(data, 'd')
</source>
 
Other accepted primitive array types are:
z boolean
c char
b byte
h short
i int
l long
f float
d double
But now suppose you want a two-dimensional double array, the equivalent of '''double[][]''' in java. How to do that? Here's how:
threeDimArr = array(data, Class.forName('[[D'))
</source>
 
Other accepted primitive array types are:
z boolean
c char
b byte
h short
i int
l long
f float
d double
See the [http://www.jython.org/archive/21/docs/jarray.html jarray documentation].
Emailconfirmed, uploaders
653
edits