So i'm trying to make a module for my program that returns a multidimensional array based on another array in the form of a command-line argument.
Here is the module that's keeping me up at night:
public static double[][][] getDimensions(String [] args)
{
final int l = args.length;
double dimensions [][][] = new double[1][l][l];
for(int count = 0; count<l; count++)
{
if(args[count].equals("NA4"))
dimensions[count][count][count] = {20.6, 15.7, 12};
if(args[count].equals("NA5"))
dimensions[count][count][count] = {17.6, 15.7, 12};
if(args[count].equals("NA1"))
dimensions[count][count][count] = {45, 18.5, 15};
if(args[count].equals("NA2"))
dimensions[count][count][count] = {32.6, 17, 15};
else
dimensions[count][count][count] = {14.5, 9.8, 7.1};
}
return dimensions;
}
The error i get is with the consequence of the if statement:
dimensions[count][count][count] = {20.6, 15.7, 12}; - Illegal start of expression
The thing is.. im pretty sure i've forgotten something ridiculously obvious but i'm tired of getting this error.