I've tried a thousand and one ways to do this code and assign a specific time to each array address but it always gives me an index error. I can't tell my mistake, please help.. Thanks

FYI we are using a provided input class so don't mind the ITI1120.readDouble() lines

```
System.out.println("Enter a maximum time: ");
double max = ITI1120.readDouble();
System.out.println("Enter a time step: ");
double h = ITI1120.readDouble();
double [] t = new double[] {};
int k = 0;
t[k] = 0.0;
while (t[k]<=max)
{
  k = k + 1;
  t[k] = t[k-1] + h;
  System.out.println(t[k]);
}

```