Oracle 1Z0-808 Exam question no. 41

Q.– Given the code fragment: 

abstract class Toy {
        int price; 
        // line n1 
}

Which three code fragments are valid at line n1? 

A) public abstract int computeDiscount( ); 

B) public int calculatePrice ( ) { 
             return price; 
     }

C) final Toy getToy ( ) {
              return new Toy( ); 
     }

D) public void printToy( ); 

E) public static insertToy(  )  {
              /* code goes here */
     }

⧪ please give your answer in a comment section.

Post a Comment

7 Comments