title: define new String inside onResponse in retrofit
body: <p>i use retrofit2.
  i'm trying define String "stat" inside onResponse but it return null.</p>
  
  <pre><code>public class StatusConfig  {    
          private String stat;    
          .......................
          public String Status() {
               APIInterface apiInterface = APIClient.getClient().create(APIInterface.class);
              Call&lt;Login&gt; call = apiInterface.LoginCheck();
              call.enqueue(new Callback&lt;Login&gt;() {
                  @Override
                  public void onResponse(Call&lt;Login&gt; call, Response&lt;Login&gt; response) {
                      if(response.isSuccessful()) stat="true";
                      else stat="false";
                  }
                  @Override
                  public void onFailure(Call&lt;Login&gt; call, Throwable t) {
                  }
              }); 
              return stat;
          }
      ............
      }
  </code></pre>
  
  <p>i'm trying this codes but still return null.</p>
  
  <pre><code>public class StatusConfig  {    
      .......................
      public String Status() {
         final String[] stat = new String[1];
           APIInterface apiInterface = APIClient.getClient().create(APIInterface.class);
          Call&lt;Login&gt; call = apiInterface.LoginCheck();
          call.enqueue(new Callback&lt;Login&gt;() {
              @Override
              public void onResponse(Call&lt;Login&gt; call, Response&lt;Login&gt; response) {
                  if(response.isSuccessful()) stat[0]="true";
                  else stat[0]="false";
              }
              @Override
              public void onFailure(Call&lt;Login&gt; call, Throwable t) {
              }
          }); 
          return stat[0];
      }
  ............
  }
  </code></pre>
  
  <p>what is the problem? what is wrong?</p>