title: how to convert string to int in Java
body: <p>I'm working on Caesar cipher example in which I want that it get different keys from user and finally one key decrypt the original text , but I got a problem, here is my code</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner user_input= new Scanner(System.in);
      String plainText = "University of malakand";
      String key;
      key = user_input.next();
  
      Ceasercipher cc = new Ceasercipher();
  
      String cipherText = cc.encrypt(plainText,key);
      System.out.println("Your Plain  Text :" + plainText);
      System.out.println("Your Cipher Text :" + cipherText);
  
      String cPlainText = cc.decrypt(cipherText,key);
      System.out.println("Your Plain Text  :" + cPlainText);
  }
  </code></pre>
  
  <p>it shows an error on this line</p>
  
  <pre><code>    String cipherText = cc.encrypt(plainText,key);
  </code></pre>
  
  <p>it shows me error on key incompatible types: </p>
  
  <blockquote>
    <p>String cannot be converted into int</p>
  </blockquote>
  
  <p>What can I do?</p>