215k views
0 votes
In compile-time (early-binding) polymorphism, the compiler decides which overloaded method to invoke. True False

1 Answer

1 vote

Final answer:

Compile-time polymorphism, where the compiler decides which overloaded method to invoke by looking at method signatures, is indeed true and refers to what is known as method overloading or static binding.

Step-by-step explanation:

The statement that in compile-time (early-binding) polymorphism, the compiler decides which overloaded method to invoke is true. Compile-time polymorphism, also known as static binding or method overloading, occurs when the method that should be called is determined at compile time, not at run time. In languages like Java and C++, methods can be overloaded by defining multiple methods with the same name, but with different parameter types or numbers of parameters. The compiler uses these differences to determine which method to call, based on the method signature provided in the code.

User Kevin Boucher
by
7.9k points