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
Q32: The values of the byte type range
Q33: Every object is assigned a serial number
Q34: What is returned by the read method
Q35: Which code moves the file pointer to
Q36: What type is returned from a call
Q38: Streams access sequences of _.<br>A) characters<br>B) files<br>C)
Q39: In Java, the simplest mechanism for reading
Q40: Caesar cipher uses a shift of each
Q41: Objects saved to an object stream must
Q42: Caesar cipher uses a shift of each