Multiple Choice
Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 3 becomes a d. For the encrypt method below, select the correct body. Assume the key shift property is accessible to the method.
Public int encrypt(int b) { __________ }
A) return (b + key) ;
B) return (b + key % 26) ;
C) return (b + key) % 256) ;
D) return (b + 26 % key) ;
Correct Answer:

Verified
Correct Answer:
Verified
Q2: Which line completes this code fragment to
Q12: Which of the following reads binary data
Q36: What type is returned from a call
Q44: What do we call the measure in
Q53: Which class is used for input of
Q54: How many bytes does the read method
Q59: Which class is used for input of
Q62: Which code stores an array buttonArray of
Q73: Which is not a method in the
Q77: Which method in the RandomAccessFile class provides