title: error while returning byte array
body: <p>I am using the below code</p>
  
  <pre><code> public byte[] encrypt(byte[] unencryptedString,String k)throws Exception {
      String encryptedString = null;
  
      String k1 = String.format("%024d", Integer.parseInt(k));
      myEncryptionKey = k1;
      myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME;
      arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT);
      ks = new DESedeKeySpec(arrayBytes);
      skf = SecretKeyFactory.getInstance(myEncryptionScheme);
      cipher = Cipher.getInstance(myEncryptionScheme);
      key = skf.generateSecret(ks);
  
      try {
          cipher.init(Cipher.ENCRYPT_MODE, key);
          byte[] plainText =
                  unencryptedString/*.getBytes(UNICODE_FORMAT)*/;
          byte[] encryptedText = cipher.doFinal(plainText);
         // encryptedString = new String(Base64.encodeBase64(encryptedText));
      } catch (Exception e) {
          e.printStackTrace();
      }
      return encryptedText;
  }
  </code></pre>
  
  <p>The return statement gives the following error:</p>
  
  <blockquote>
    <p><em>encryptedText cannot be resolved to a variable</em></p>
  </blockquote>