Which two, inserted independently at lines 2 and 3, allow the code to compile?

Given:
1. public interface Player {
2. // insert code here
3. // insert code here
4. }
5. class F implements Player {
6. public void play(){
7. // …
8. }
9. public void stop(){
10. // …
11. }
12. }
Which two, inserted independently at lines 2 and 3, allow the code to compile? (Choose two.)

Given:
1. public interface Player {
2. // insert code here
3. // insert code here
4. }
5. class F implements Player {
6. public void play(){
7. // …
8. }
9. public void stop(){
10. // …
11. }
12. }
Which two, inserted independently at lines 2 and 3, allow the code to compile? (Choose two.)

A.
void play();
void stop();

B.
final void play();
final void stop();

C.
public void play();
public void stop();

D.
void play();
int stop();

E.
static void play();
static void stop();

F.
private void play();
private void stop();



Leave a Reply 0

Your email address will not be published. Required fields are marked *