Returning String Arrays and Arrays operations in JAVA -


i writing using java. putting objects vehiclelist array , having issues returning array in getvehiclelist class. vehiclelist array of vehicle[]. keep getting "string cannot converted string[]. hope making sense. here usetaxlist class. appreciated. thank you.

this have far , keep getting error "string cannot converted string[]". know error means, don't know how resolve it.

public vehicle[] getvehiclelist() {    string[] result;   (int = 0; < vehiclelist.length; i++) {      result += vehiclelist[i].tostring();   }    return result;  } 

if want convert elements vehiclelist string-objects, can write

string[] result = new string[vehiclelist.length]; (int = 0; < vehiclelist.length; i++)     result[i] = vehiclelist[i].tostring();  return result; 

simply write code getvehiclelist()-method. might have add custom tostring()-method in vehicle-class!


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -