0

I don't recognize this kind of form Java syntax for constructor - granted I do very little Java now (taken from there):

new PersistentArrayMap(new Object[]{formKey, form});

I was expecting something along the lines of new Object(...) as parameter. Could someone decompose the above line ?

0

2 Answers 2

2

You are creating new Object array Object[] initialised to {obj1, obj2}

Sign up to request clarification or add additional context in comments.

Comments

1

It is a way of declaring and initializing an array in java. A simpler example is the following:

int[] myIntArray = new int[]{1,2,3};

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.