Ask Question
24 July, 02:00

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. 24 July, 05:32
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers