Declare Multiple Java Arrays on Same Line?
Is it possible to initialize and/or declare multiple arrays in the same line in Java?
int a, b, c, d, e = 4
int a, b, c, d, e, = new int
doesn't seem to work (size of array is 4)
Bear in mind that
int a, b, c, d, e = 4;
is declaring 5 ints but only initialising 'e'.
In the same way,
int a, b, c, d, e = new int;
will only initialise e.
You'd need something like
int a=new int, b=new int, etc...
which frankly, isn't worth one-lining...