Multiple choice technology programming languages

A class can define two methods with the same name as long as the return types are different

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Method overloading in Java requires methods to have different parameter lists (different number, types, or order of parameters). Return type alone is insufficient to distinguish overloaded methods - the compiler uses the parameter signature to resolve which method to call.