title: calculate percentage and display in a texview android studio
body: <p>I am developing an application where I pass 1 variables int through a string of an activity to next activity, in the next activity I take that string and return it again and an int, then I calculate a percentage and display and a textview, the past variable and approx1 so I check if it is not empty, then I calculate the percentage ex: ((3/45) * 100) and display in a text view, reviewing again for string ... but in any way I make a mistake, what can be ?</p>
  
  <pre><code>    Bundle bundle = getIntent (). GetExtras ();
      String aprox1 = bundle.getString ("aprox1");
      if (aprox1! = null)
      try {
      num3 = Integer.parseInt (aprox1);
      result = Math.round ((num3 / 45) * 100);
      TextView counter2 = (TextView) findViewById(R.id.textView16);
      String abcString2 = Integer.toString (result);
      counter2.setText (abcString2);
      }
      catch (NumberFormatException e) { 
      }
  </code></pre>