title: How to scalar multiply array
body: <p>Write a method scalarMultiply which takes as input a double[] array, and a double scale, and returns void. The method should modify the input array by multiplying each value in the array by scale.
  . Question to consider: When we modify the input array, do we actually modify the value of the
  variable
  array
  ?</p>
  
  <p>Here is what i did until now, but i dont know what i did wrong because it still is not working.</p>
  
  <pre><code>public class warm4{
  
    public static void main(String[] args){
      double[] array1 = {1,2,3,4};
       double scale1 = 3;    
      }
   }
     public static void scalarMultiply(double[] array, double scale){
       for( int i=0; i&lt;array.length; i++){
       array[i] = (array[i]) * scale; 
       System.out.print(array[i] + " ");
       }
     }
   }
  </code></pre>