Is it possible to initialize and/or declare multiple arrays in the same line in Java?
ie.
int a, b, c, d, e = 4
works but
int[] a, b, c, d, e, = new int[4]
doesn't seem to work (size of array is 4)
You are missing the new keyword
Try this:
int[] a, b, c, d, e = new int[4];
e.int[] a, b, c, d, e ; a = (b = (c = (d = (e = new int[4])))); The assignment operators' return value is the assigned value. However, as Jon already said, they would all still refer to the same array.. And it's two lines now.. and ugly..