title: how to set double latitude and double longitude into array
body: <p>Hello please look at my code below. </p>
  
  <pre><code>        public  void onClick(View arg0)  {      
                  // create class object
                  gps = new GPSTracker(MainActivity.this);
  
                  // check if GPS enabled     
                  if(gps.canGetLocation()){
  
                      double latitude = gps.getLatitude();
                      double longitude = gps.getLongitude();
  
                       String mydate = java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());
  
                      // \n is for new line
  
                      Toast.makeText(getApplicationContext(), "Time : " +mydate + " Your Location is - \nLat: " 
                      + latitude + "\nLong: " + longitude, Toast.LENGTH_LONG).show(); 
  
                  }
  </code></pre>
  
  <p>At GPSTracker class :</p>
  
  <pre><code>public double getLatitude(){
      if(location != null){
          latitude = location.getLatitude();
      }
  
      // return latitude
      return latitude;
  }
  
  /**
   * Function to get longitude
   * */
  public double getLongitude(){
      if(location != null){
          longitude = location.getLongitude();
      }
  
      // return longitude
      return longitude;
  }
  </code></pre>
  
  <p>I want to save latitude and longitude to array.</p>
  
  <p>Like when click btnShowLocation button, the latitude will be set into n1x, and its longitude n1y. </p>
  
  <p>Then, the second time that button is clicked, the latitude will be set into n2x, and its longitude n2y.</p>