Oracle 1Z0-808 Exam question no. 75

Q.- Given the code fragment: 

1. abstract class Planet {
2.         protected void revolve( ) { 
3.         } 
4.         abstract void rotate ( ); 
5. }
6. 
7. class Earth extends Planet { 
8.          private void revolve(  ) {
9.          }
10.        private void rotate ( )  { 
11.        }
12. } 

Which two modifications enable the code to compile? 

A) Make the method at line 4 public. 

B) Make the method at line 2 public. 

C) Make the method at line 8 public. 

D) Make the method at line 8 protected. 

E) Make the method at line 10 protected.


⧪ please give your answer in a comment section.

Post a Comment

4 Comments