Friday, November 2, 2018

Java Coming Back to Me Slowly

ArrayList[] argList = new ArrayList();
argList.add(new ArgList("-zs", ArgValues.FLOAT));

That first line has the error "Type Mismatch: Cannot convert from ArrayList to ArrayList"


In C this would be something like

argList[] args = [{-zs", "FLOAT}. "-ze", FLOAT}];

I was trying to do this the hard way:
ArgList[] argList = {
new ArgList("-zs", ArgValues.FLOAT),
new ArgList("-zi", ArgValues.FLOAT),
new ArgList("-ze", ArgValues.FLOAT)};


Rick C said...

You declared argList as an array of ArrayLists. You probably meant
ArrayList argList = new ArrayList();

StormCchaser said...

You are trying to store an ArrayList in an array of ArrayLists.