Here is the code I am working on. This is what I have at the moment. It is just a practice round for me to practice JAVA and understand the Ceaser Cipher.
public class CeaserCipher
{
public static void main (String [] args) {
Scanner keyboard = new Scanner(System.in);
System.out.println("Enter test letters for Caesar cipher in capitals");
String input = keyboard.nextLine();
char[] strArray = input.toCharArray();
System.out.print("What is the key: ");
int key = keyboard.nextInt();
//String[] arrKey = new String[] {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"};
String c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char[] arrKey = c.toCharArray();
for (int i = 0; i < strArray.length ; i++){
char cipherValue = strArray[i];
int index = Arrays.binarySearch(arrKey, cipherValue);
int j = (key + index)%26;
System.out.print(arrKey[j]);
}
}
}