Im a Java beginner and I don't understand the following statement
Forest f = new Forest(new Tree[]{m,p}).
What I understand is that we construct a new Tree
inside of a forest but the following expression {m,p}
I dont understand. What baffles me are these type of brackets {
. I thought that you always used ()
for a constructor.
An explanation would be great.
PS.
Mango Tree m= new Mango Tree;
Pear Tree p = new PearTree();