Ask 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 aMethod ('V'); c. aMethod (char 'M'); d. aMethod ('Q');

+3
Answers (1)
  1. 14 June, 17:52
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers