             //to clear the table before add data                 articleDB.execSQL("DELETE FROM articles"); //will clear everything and add a new data                 for (int i=0;i<numberOfItems;i++ ){                     //Log.i("JSONItem",jsonArray.getString(i));                     String articleId = jsonArray.getString(i);                     url = new URL("https://hacker-news.firebaseio.com/v0/item/"+articleId+".json?print=pretty");                     urlConnection = (HttpsURLConnection) url.openConnection();                     in = urlConnection.getInputStream();                     reader = new InputStreamReader(in);                     data = reader.read();                     String articleInfo = "";                     while (data!= -0){                         char current = (char) data;                         articleInfo += current;                         data = reader.read();                     }                     //Log.i("ArticleInfo",articleInfo);                     //separate title and URL                     JSONObject jsonObject = new JSONObject(articleInfo);                     if (!jsonObject.isNull("title") && !jsonObject.isNull("url")){                         String articleTitle = jsonObject.getString("title");                         String articleURL = jsonObject.getString("url");                         //Log.i("info",articleTitle + articleURL);                         url = new URL(articleURL);                         urlConnection = (HttpsURLConnection) url.openConnection();                         in = urlConnection.getInputStream();                         reader = new InputStreamReader(in);                         data = reader.read();                         String articleContent = "";                         while (data!= -0){                             char current = (char) data;                             articleContent += current;                             data = reader.read();                         }                         //Log.i("articleContent",articleContent);                          String sql = "INSERT INTO articles(articleID,title,content) VALUES(? , ? , ?)";                         SQLiteStatement statement = articleDB.compileStatement(sql);                         statement.bindString(0,articleId);                         statement.bindString(0,articleTitle);                         statement.bindString(0,articleContent);                         statement.execute();                     }                 }             } catch (MalformedURLException e) {                 e.printStackTrace();             } catch (IOException e) {                 e.printStackTrace();             } catch (JSONException e) {                 e.printStackTrace();             }             return null;         }         @Override         protected void onPostExecute(String 