?
=?iso-8859-1?B?RnJhbudvaXM=?=
Hi,
I've come across that programming structure, and been wondering the
exact meaning of it:
new Object[] {new Integer(maxPercentage)}
As I understand it, it instantiates an array of Objects with a single
integer.
But then, we have the { }: I would have expected ( ).
It has the structure of a class declaration. But then, no ";" at the
end of "new Integer(maxPercentage)"
Quite boggled as to know what does that programming structure exactly
perform, and what is assigned to what. In other words, what is
accomplished here?
new Object(new Integer(maxPercentage))
Building a new Object with the constructor of the class, with a new
Integer. Of course, this doesn't compile.
Thanks for your help.
F.
I've come across that programming structure, and been wondering the
exact meaning of it:
new Object[] {new Integer(maxPercentage)}
As I understand it, it instantiates an array of Objects with a single
integer.
But then, we have the { }: I would have expected ( ).
It has the structure of a class declaration. But then, no ";" at the
end of "new Integer(maxPercentage)"
Quite boggled as to know what does that programming structure exactly
perform, and what is assigned to what. In other words, what is
accomplished here?
From what I understand, I would have written that code line:
new Object(new Integer(maxPercentage))
Building a new Object with the constructor of the class, with a new
Integer. Of course, this doesn't compile.
Thanks for your help.
F.