Which of the following modifiers can not be applied to a method?
| a. | abstract |
| b. | private |
| c. | protected |
| d. | public |
| e. | volatile |
| f. | None of the above. |
Which of the following modifiers can not be applied to a method?
| a. | final |
| b. | static |
| c. | synchronized |
| d. | transient |
| e. | native |
| f. | None of the above. |
Which of the following modifiers can not be used with the abstract modifier in a method declaration?
| a. | final |
| b. | private |
| c. | protected |
| d. | public |
| e. | static |
| f. | synchronized |
| g. | native |
Which of the following statements is true?
| a. | An abstract method can not be overridden by an abstract method. |
| b. | An instance method that is not abstract can not be overridden by an abstract method. |
| c. | An abstract method declaration can not include a throws clause. |
| d. | The body of an abstract method is represented by a set of empty brackets. |
| e. | None of the above. |
Which of the following statements is not true?
| a. | A static method is also known as a class method. |
| b. | A class method is not associated with a particular instance of the class. |
| c. | The keyword, this, can not be used inside the body of a static method. |
| d. | The keyword, super, may be used in the body of a static method. |
| e. | A method that is not static is known as an instance method. |
| f. | None of the above. |
Which of the following statements are true?
| a. | A final method can not be overridden. |
| b. | All methods declared in a final class are implicitly final. |
| c. | The methods declared in a final class must be explicitly declared final or a compile-time error occurs. |
| d. | It is a compile-time error if a private method is declared final. |
| e. | A machine-code generator can inline the body of a final method. |
Which of the following statements are true?
| a. | If an accessible superclass method is static, then any method with the same signature in a subclass must also be static. |
| b. | If a superclass method is synchronized, then the overriding method must also be synchronized. |
| c. | If a superclass method is public, then the overriding method must also be public. |
| d. | If a superclass method is native, then the overriding method must also be native. |
| e. | If a superclass method is protected, then the overriding method must be protected or public. |