I wonder how can I call a class method which are expecting Object...(Object[]) as parameter.
I can't know at compilation time now many parameters I need to pass to it,
so I can't do like somemethod(1,2,3,4,5).
I'm doing big construction like:
if (param.lengts()==5) {
somemethod(1,2,3,4,5);
} elseif (param.lengts()==4)
somemethod(1,2,3,4);
....
I was trying to pass List<> and ArrayList<> but without success.
Is there a simple way how to convert my dynamic array to the method? I can't change method constructor.
Problem about to call the method, not with declare or read parameters inside the method.
somemethoddeclared?someMethod(boolean...),someMethod(byte...), ... ,someMethod(double....),someMethod(Object...).IPrintableinstead of integers when calling that constructor.