Computer Applications

The statement given below is termed as:

public void Accept(int a)

  1. Method signature
  2. Method block
  3. Method prototype
  4. Constructor

User Defined Methods

6 Likes

Answer

Method prototype

Reason — In Java, a method prototype specifies the method’s access specifier, return type, name, and parameter list without including its body. The statement public void Accept(int a) shows these elements but does not contain a method body, so it is a method prototype.

Answered By

3 Likes


Related Questions