Consider the following declarations: public interface Encryptable
{
Void encrypt(String key) ;
}
Public class SecretText implements Encryptable
{
Private String text;
_____________________________
{
// code to encrypt the text using encryption key goes here
}
}
Which of the following method headers should be used to complete the SecretText class?
A) public void encrypt()
B) public void encrypt(String aKey)
C) public String encrypt(String aKey)
D) void encrypt(String aKey)
Correct Answer:
Verified
Q5: Which of the following statements about an
Q6: Consider the following code snippet. public interface
Q7: Consider the following code snippet: public class
Q8: Consider the following code snippet: public class
Q11: To use an interface, a class header
Q12: _ can reduce the coupling between classes.
A)
Q13: Which statement about methods in an interface
Q14: Suppose you are writing an interface called
Q15: Which of the following statements about converting
Q63: Which of the following statements about abstract
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents