title: Breaking The Caesar Cipher
body: <pre><code>import java.util.Scanner;
  
  public class CaesarCipher {
  
  public static void main(String[] args) {
      // TODO Auto-generated method stub
  Scanner input = new Scanner (System.in);   
  
      System.out.println("Enter the encrypted text :"); 
  String cryptedtext = input.nextLine();                
      cryptedtext = cryptedtext.toLowerCase();                
  String[] array = new String[cryptedtext.length()];        
      for (int i = 97; i &lt; 123; i++)          
      {           
          int mostFrequent = 0;       
          for (int j = 0; j &lt; cryptedtext.length(); j++) 
          {           
              if (cryptedtext.charAt(j) == i){    
                  ++mostFrequent;                 
                  }       
              }           
          System.out.println((char) i + " is showing " + mostFrequent + " times ");                                                               
          } 
      } 
  }
  </code></pre>
  
  <p>I am trying to break the cipher and i have to count how many times does one letter repeats it self in a word or sentence. I only need to turn the crypt word/sentence to an actual sentence in English and I really don't know how to do it. I have to write something that is encrypt and count the letters that are repeating ( so far I have done that ),but i don't actually know how to decrypt it. </p>