title: How to pass variable values between successive for loops?
body: <p>I have two successive for loops and i need to pass one of the variables' value to an instance inside the other for loop.</p>
  
  <pre><code>for(int x=0; x&lt; sentence.length(); x++)  {
  
    int i;
    if (!Character.isWhitespace(sentence.charAt(x)))
        i = x ;
        break;    
  }
  
  for (int  i  ; i &lt; sentence.length(); i++) {
    if (Character.isWhitespace(sentence.charAt(i)))
       if (!Character.isWhitespace(sentence.charAt(i + 1)))
  }
  </code></pre>
  
  <p>This is just a part of my program and my purpose is assigning the value of x (from the fírst for loop) to i variable (from the second for loop)  so that i wont start from 0 but from the value of x(before breaking the first for loop)...</p>