title: length of valid string returns 0
body: <p>I have a String</p>
  
  <pre><code>String A;
  </code></pre>
  
  <p>and some methods handling it</p>
  
  <pre><code>public void setA(String A) throws AInvalidException{
      if(isAValid())
          this.A = A;
      throw new AInvalidException();
  }
  
  public boolean isAValid(){
      int aLength = getA().length();
      return b = (aLength==9) ? true: false;
  }
  
  public String getA(){
      return A;
  }
  </code></pre>
  
  <p>When I try to see the length of my string in main</p>
  
  <pre><code>AClass.setA("123456789");
  </code></pre>
  
  <p>it says that my String is invalid and after debugging I saw that the length of my String is zero. What possibly I'm doing wrong?</p>