Practice Test Geeks home

OCP - Oracle Certified Professional OCP Java Class Design and OOP Questions and Answers

Given the following class definitions, which statement is true?
public class Animal {

public Number getAge() throws Exception {

return 10;

}

}

public class Dog extends Animal {

// INSERT METHOD HERE

}

Select your answer