title: Initialize the final instance variable of inner class
body: <p>Hello I want to initialize the final variable of inner class in it constructor but compiler forcing me to initialize it at the time of declaration Why Any idea ?</p>
  
  <p>How can I handle this situation ?</p>
  
  <pre><code>public MainActivity extends Activity {
      private class AcceptThread extends Thread {
              private final BluetoothServerSocket mBluetoothServerSocket;
              public AcceptThread() {
                  try {
                      mBluetoothServerSocket = mBluetoothAdapter.listenUsingRfcommWithServiceRecord("BT_SERVER", UUID.fromString("a60f35f0-b93a-11de-8a39-08002009c666"));
                  } catch (IOException e) { }
              }
  
              // Here methods
      }
  }
  </code></pre>
  
  <p>See here who answered to my question that seems weird here</p>
  
  <p><img src="https://i.stack.imgur.com/4t8Dk.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/V6sUB.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/FeMZh.png" alt="enter image description here"></p>