title: Trying to create a simple encryption program
body: <p>I'm trying to create a simple encryption program that can be easily encrypted and decrypted nothing fancy.
  so far I have the basic input set up:</p>
  
  <pre><code>import java.util.Scanner;
  class test {
   private static Scanner inp;
   public static void main(String[] args) {
      inp = new Scanner(System.in);
      System.out.println("Input Password");
      int n = inp.nextInt();
      System.out.println(n);
      if(n!=234) {
          System.out.println("Denied Acess");
      } else { 
          System.out.print("Password Accepted");
      }
      System.out.print("Input Text to encrypt: ");
      String m = inp.next();
      System.out.println(m);
   }
  }
  </code></pre>
  
  <p>I'm just starting out in java and this is my first real program as I am teaching myself it is slow going :P (I only started a few days ago)</p>
  
  <p>Anyway I need a way to take a mass input and have a mass out put where I can target letters/numbers and have them changed to a corresponding preset string</p>
  
  <p><strong>example:</strong></p>
  
  <blockquote>
    <p>input text:  Hello</p>
    
    <p>output text: {aeh}{wer}{qds}{qds}{cxv}</p>
  </blockquote>
  
  <p>but I would also need a way to read the output code when input and have it output the original input which I don't know if I can do that with multiple digits unless I could do a if else nest such as</p>
  
  <pre><code>if(dig1==a) {
   if(dig2==b) {
    if(dig3==c) {
  System.out.print("a")
  } else {
   if(dig1==b) {
    if(dig2==c) {
     if(dig3==d) {
  System.out.print("b")
  } else {
  if (dig1==c) {
   if (dig2==d) {
  ect.
  </code></pre>
  
  <p>but even then I don't know how to automatically set it so the program can automatically assign each digit/set a variable and then have it out put the corresponding string</p>