Java OCA OCP Practice Question 1084

Question

Which of the following are true about this method declaration?

void myMethod(String s) {  
}  
  • A. myMethod() is static.
  • B. myMethod() does not return a value.
  • C. myMethod() is abstract.
  • D. myMethod() may not be accessed outside of the package in which it is declared.


B and D.

Note

myMethod() does not return a value and is declared with package access.




PreviousNext

Related