Following code gave an incorrect answers. What is a best way to correct it? I am new to programming.
public class test {
  public static void main(String[] args) {
    double[] array = new double[] {5, 4, 6, 7, 7, 6};
    double t= 6.4;  
    for (int k = 0; k < array.length; ++k){
      double d= array[k]-t;
      System.out.println("d is="+d); 
    }
  }
}
 
    