Since Java 8 this is possible:
int[] a = IntStream.range(1, 100).toArray();
(And shorter than the other java 8 answer .).
Since Java 8 this is possible:
int[] a = IntStream.range(1, 100).toArray();
(And shorter than the other java 8 answer .).