public static void main(String[] args)
{
int[] out;
for (i=0;i<args.length;i++)
{
String number_string=new String();
if(args[i].equals("-i"))
{
if(i+1<args.length)
{
i++;
number_string=args[i];
}
StringTokenizer number=new String Tokenizer (number_string,',');
int chip_number=number_string.replaceAll("[^,]","").length();
chip_number++;
int k=0;
while (number.hasMoretokens())
{
number_int[k]=Integer.parseInt(number.nextToken());
k++;
}
}
}
for(i=chip_number-1;i>=0;i--)
{
for(j=0;j<number_int[i];j++)
{
out[j]=j;
}
//should be a double array here?
}
}
hi all,
the situation is, if:
input:-i 3,2,4,5
the output should be:
0,0,0,0
1,1,1,1
2, ,2,2
, ,3,3
, , ,4
i start from the end of input and put the list 0->(number_int-1)
my problem is, can i use double array to get the result as the expected output?
or any other way should i do?