by the waythere is slight chance that the old and num arrays will remain equal even after num is sortednamelyif num is already sorted before it is cloned but the odds of this occurring are less than one in four million simple cryptography with strings and character arrays one of the primary applications of arrays is the representation of strings of characters that isstring objects are usually stored internally as an array of characters even if strings may be represented in some other waythere is natural relationship between strings and character arrays--both use indices to refer to their characters because of this relationshipjava makes it easy for us to create string objects from character arrays and vice versa specificallyto create an object of class string from character array awe simply use the expressionnew string(athat isone of the constructors for the string class takes character array as its argument and returns string having the same characters in the same order as the array for examplethe string we would construct from the array [acatis acat likewisegiven string swe can create character array representation of by using the expressions tochararray(that isthe string class has methodtochararraywhich returns an array (of type char[]with the same characters as for exampleif we call tochararray on the string adogwe would get the array [adogthe caesar cipher one area where being able to switch from string to character array and back again is useful is in cryptographythe science of secret messages and their applications this field studies ways of performing encryptionwhich takes messagecalled the plaintextand converts it into scrambled messagecalled the ciphertext likewisecryptography also studies corresponding ways of performing decryptionwhich takes ciphertext and turns it back into its original plaintext arguably the earliest encryption scheme is the caesar cipherwhich is named after julius caesarwho used this scheme to protect important military messages (all of caesar' messages were written in latinof coursewhich already makes them unreadable for most of us!the caesar cipher is simple way to obscure message written in language that forms words with an alphabet