title: Integer.parseInt Returns an error: The method parseInt(String) in the type Integer is not applicable for the arguments (R.string)
body: <p>I have to build an array of some structures that i've built:</p>
  
  <p>The class (Item) is built the following way: (It is shown below)</p>
  
  <p>Now my problem is that im trying to parse some string number that Im getting from another place (a list in this case) to int.</p>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>The method parseInt(String) in the type Integer is not applicable for
    the arguments (R.string)</p>
  </blockquote>
  
  <p>This is the piece of the code:
  (It says the error is in ("Integer.parseInt"):</p>
  
  <pre><code>markers.add(new item(Integer.parseInt(items.get(0).get(i)), items.get(1).get(i), items.get(2).get(i), items.get(3).get(i), Integer.parseInt(items.get(4).get(i)), Integer.parseInt(items.get(5).get(i))));
  </code></pre>
  
  <p>its just long but its not complicated.</p>
  
  <p>Thanks a lot!</p>
  
  <p>Edit:</p>
  
  <p>the items list is just a list of lists:</p>
  
  <pre><code>List&lt;List&lt;string&gt;&gt; items;
  </code></pre>
  
  <p>and the structure of the class is:</p>
  
  <pre><code>private int id;
  private string title;
  private string desc;
  private string pub;
  private int p;
  private int n;
  </code></pre>
  
  <p>the code:</p>
  
  <pre><code>public List&lt;List&lt;String&gt;&gt; Download()
      {
          String data = null;
          //String res = "";
          try {
              client = new DefaultHttpClient();// Reference to the Internet
              httppost = new HttpPost(URL);
              HttpResponse response = client.execute(httppost);
              HttpEntity entity = response.getEntity();// get the content of the
                                                          // message
              InputStream webs = entity.getContent();
  
              BufferedReader in = new BufferedReader(new InputStreamReader(webs,"iso-8859-1"));
  
              StringBuffer sb = new StringBuffer("");
  
              String l = " ";
              // String nl=System.getProperty("line.separator");
              while ((l = in.readLine()) != null) {
                  sb.append(l + "\n");
              }
              data = sb.toString();
              webs.close();
  
              List&lt;List&lt;String&gt;&gt; all= new ArrayList&lt;List&lt;String&gt;&gt;();
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
              all.add(new ArrayList&lt;String&gt;());
  
              try {
  
                  JSONObject json = new JSONObject(data);
                  JSONArray jArray = json.getJSONArray("item");
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("id"));
                  }
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("title"));
  
                  }
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("desc"));
  
                  }
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("pub"));
  
                  }
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("p"));
  
                  }
                  for (int i = 0; i &lt; jArray.length(); i++) {
  
                      JSONObject json_data = jArray.getJSONObject(i);
                      //res += json_data.getString("title")+"\n";
                      all.get(0).add(json_data.getString("n"));
  
                  }
  
                  return all;
  
              } catch (JSONException e) {
  
              }
  
              //return news;
          } catch (Exception e) {
              int x=3;
              // TODO: handle exception
          }
  
          return null;
      }
  </code></pre>