is three letters after it in the alphabet for that language soin an english messagewe would replace each with deach with eeach with fand so on we continue this approach all the way up to wwhich is replaced with thenwe let the substitution pattern wrap aroundso that we replace with ay with band with using characters as array indices if we were to number our letters like array indicesso that is is is and so onthen we can write the caesar cipher as simple formulareplace each letter with the letter ( mod where mod is the modulus operatorwhich returns the remainder after performing an integer division this operator is denoted %in javaand it is exactly the operator we need to easily perform the wrap around at the end of the alphabet for mod is mod is and mod is the decryption algorithm for the caesar cipher is just the opposite--we replace each letter with the one three places before itwith wrap around for aband we can capture this replacement rule using arrays for encryption and decryption since every character in java is actually stored as number--its unicode value-we can use letters as array indices for an uppercase character cfor examplewe can use as an array index by taking the unicode value for and subtracting of coursethis only works for uppercase lettersso we will require our secret messages to be uppercase we can then use an arrayencryptthat represents the encryption replacement ruleso that encrypt [iis the letter that replaces letter number (which is - for an uppercase character in unicodethis usage is illustrated in figure likewisean arraydecryptcan represent the decryption replacement ruleso that decrypt[iis the letter that replaces letter number figure illustrating the use of uppercase characters as array indicesin this case to perform the replacement rule for caesar cipher encryption