title: creating delay in execution of program
body: <p>I want to create a delay in my code in such a way that one portion should be executed after 5 seconds and other portion after 10 seconds. I have tried TRY CAtcH threading but don't know where is the issue.. here Is my code kindly have a look at it.. Thanks in adavnce....</p>
  
  <pre><code> // This portion to be executed after 5 seconds 
  
                val1 = Integer.parseInt(String.valueOf(unit.getText()));
                val2 = Integer.parseInt(String.valueOf(unit2.getText()));
                result = val1 + val2;
  
                val = Integer.toString(result);
               int len = val.length();
  
                if (len == 1) {
  
                    num1 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 1)));
  
                    unitanswer1.setText(Integer.toString(num1));
                    unitanswer2.setText(Integer.toString(0));
                    unitanswer2.setVisibility(View.INVISIBLE);
  
                } else {
                    num1 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 1)));
                    unitanswer1.setText(Integer.toString(num1));
  
                    num2 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 2)));
                    unitanswer2.setText(Integer.toString(num2));
                }
  </code></pre>
  
  <p>// This portion to be executed after 10 seconds</p>
  
  <pre><code>             val1 = Integer.parseInt(String.valueOf(tens.getText()));
               val2 = Integer.parseInt(String.valueOf(ten2.getText()));
               val3=Integer.parseInt(String.valueOf(unitanswer2.getText()));
  
               result = val1 + val2 + val3;
  
              val = Integer.toString(result);
               len = val.length();
  
              if (len == 1) {
  
                  num1 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 1)));
  
                 tenanswer1.setText(Integer.toString(num1));
                  tenanswer2.setText(Integer.toString(0));
                  tenanswer2.setVisibility(View.INVISIBLE);
  
              }
              else {
                  num1 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 1)));
                 tenanswer1.setText(Integer.toString(num1));
  
                  num2 = Integer.parseInt(String.valueOf(val.toString().charAt(len - 2)));
                  tenanswer2.setText(Integer.toString(num2));
  
                  //Animation's work to be done here.....
                  //remaining possibilites of addition....
              }
              }
  </code></pre>