P

Pooja • 4.41K Points
Extraordinary

Q. What is the difference between a method declaration and a method definition in Java?

  • (A) Declaration specifies method name, return type, and parameters; definition provides the implementation
  • (B) Declaration is used for constructors, and definition is used for regular methods
  • (C) Declaration is optional, and definition is mandatory
  • (D) Declaration and definition are the same in Java
  • Correct Answer - Option(A)
  • Views: 41
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics