Examveda
Examveda

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

Answer: Option A


This Question Belongs to Java Program >> Constructors And Methods

Join The Discussion

Related Questions on Constructors and Methods

What is a constructor in Java?

A. A special method to create instances of classes

B. A method used for mathematical calculations

C. A method to perform string manipulations

D. An exception handling mechanism