What does new Object[]{} in Java means?
It's used to initialize an array of Object
with a value of 3
at index 0
.
Object[] objs = new Object[]{3,4};
is the same as:
Object[] objs = new Object[2];
objs[0] = 3;
objs[1] = 4;
So you access it as objs[0];