title: Can't parse String to Long and use it in list
body: <p>I am getting some values in long <code>getJan();</code> from server and has to format this value so that i have some commas and look nicer. And put that values in List that accept longs, but DecimalFormat is returning String. I must covert to long so that I can put them in my list. I tried both <code>Long.valueOf()</code> and <code>Long.parseLong()</code>  but values are not shown.</p>
  <p>For this post i put only one value but in future it will be more that why I am looping through list.</p>
  <p>my code:</p>
  <pre><code>List&lt;Entry&gt; lista = new ArrayList&lt;&gt;();
  
          NumberFormat myFormat = NumberFormat.getNumberInstance(Locale.US);
          myFormat.setGroupingUsed(true);
  
  
          DecimalFormat decimalFormat = new DecimalFormat(&quot;#.00&quot;);
          decimalFormat.setGroupingUsed(true);
          decimalFormat.setGroupingSize(3);
          Long jan = Long.parseLong(decimalFormat.format(netWorthPerMonth.getJan()));
       //   Log.i(TAG, &quot;setSingleLineChart: &quot; + jan);
  
          List&lt;Long&gt; listOfMonth = new ArrayList&lt;&gt;();
          listOfMonth.add(jan);
          
  
          for (int i = 0; i&lt;  handleXAxis().size();i++){
              lista.add(new Entry(i, listOfMonth.get(i) ));
          }
  </code></pre>