app/src/main/java/com/example/android/quakereport/QueryUtils.java
/**
     * Return a list of {@link Earthquake} objects that has been built up from
     * parsing a JSON response.
     */
Return a list of  Earthquake objects that has been built up from
parsing a JSON response.
Return a list of Earthquake objects that has been built up from parsing a JSON response .
public static List<Earthquake> fetchEarthquakeData(String requestUrl) {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Log.i(LOG_TAG, "TEST:fetchEarthquakeData() called...");
        URL url = createUrl(requestUrl);
        String jsonResponse = null;
        try {
            jsonResponse = makeHttpRequest(url);
        } catch (IOException e) {
            Log.e(LOG_TAG, "Problem parsing the earthquake JSON results", e);
        }
        List<Earthquake> result = extractFeatureFromJson(jsonResponse);
        return result;
    }
public static List < Earthquake > fetchEarthquakeData ( String requestUrl ) { try { Thread . sleep ( 2000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } Log . i ( LOG_TAG , "TEST:fetchEarthquakeData() called..." ) ; URL url = createUrl ( requestUrl ) ; String jsonResponse = null ; try { jsonResponse = makeHttpRequest ( url ) ; } catch ( IOException e ) { Log . e ( LOG_TAG , "Problem parsing the earthquake JSON results" , e ) ; } List < Earthquake > result = extractFeatureFromJson ( jsonResponse ) ; return result ; }
Return a list of {@link Earthquake} objects that has been built up from
 parsing a JSON response.
Return a list of { @link Earthquake } objects that has been built up from parsing a JSON response .
// Create an empty ArrayList that we can start adding earthquakes to //        List<Earthquake> earthquakes = new ArrayList<>(); // Try to parse the SAMPLE_JSON_RESPONSE. If there's a problem with the way the JSON // is formatted, a JSONException exception object will be thrown. // Catch the exception so the app doesn't crash, and print the error message to the logs. // If an error is thrown when executing any of the above statements in the "try" block, // catch the exception here, so the app doesn't crash. Print a log message // with the message from the exception. // Return the list of earthquakes