Ask Question
30 December, 10:25

Which of the following is a correct call to a method declared as public static void i) aMethod (char code) ? a. void aMethod (); b. void aMethod ('V'); c. aMethod (char 'M'); d. aMethod ('Q');

+5
Answers (1)
  1. 30 December, 12:42
    0
    Option (d) i. e aMethod ('Q'); is the correct answer for the given question.

    Explanation:

    To call any method following syntax is used

    methodname (parameter);

    In option (a) the return type void is used and no char parameter is passed in the function so this option is wrong.

    In option (b) the return type void is used which is not correct syntax to calling a method so this option is wrong.

    In option (c) the char datatype is passed in the function which is not correct syntax to calling a method so this option is wrong.

    So aMethod ('Q'); is the correct answer.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following is a correct call to a method declared as public static void i) aMethod (char code) ? a. void aMethod (); b. void ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers