Advertisements
Advertisements
Question
A method name should be ______.
Options
a keyword
an identifier
an object
a class
MCQ
Fill in the Blanks
Advertisements
Solution
A method name should be an identifier.
Explanation:
- A method name should be a valid identifier.
- It follows Java naming rules, such as starting with a letter, _, or $, and it cannot be a keyword.
shaalaa.com
Is there an error in this question or solution?
Chapter 3: User-Defined Methods - Exercises [Page 90]
