Ask Question
26 February, 14:15

Given the following code, what is output by the method call, mystery (6 * 8) ?

public static void mystery (int x[]) {

System. out. println ("A");

}

public static void mystery (int x) {

System. out. println ("B");

}

public static void mystery (String x) {

System. out. println ("C");

}

A

B

C

CA

CB

Which of the following is true about overloaded methods?

Java cannot use a method's return type to tell two overloaded methods apart.

Java cannot use a method's parameters to tell two overloaded methods apart.

You can only overload methods that have parameters.

All overloaded methods must have different names.

None of the above

Given the following code, what is output by the method call, mystery (5, 7.0015) ?

public static void mystery (int a) {

System. out. println ("A");

+5
Answers (1)
  1. 26 February, 15:07
    0
    The answers are: Letter B, Java cannot use a method's return type to tell two overloaded methods apart, and public static void mystery (int a, double b) { System. out. println

    Explanation:

    public static void mystery (int x) { System. out. println ("B"); Java cannot use a method's return type to tell two overloaded methods apart. public static void mystery (int a, double b) { System. out. println
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Given the following code, what is output by the method call, mystery (6 * 8) ? public static void mystery (int x[]) { System. out. println ...” 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