Defining two methods with the same name but with different parameters is called.

  1. Loading

  2. Overloading

  3. Multiplexing

  4. Duplexing


Correct Option: B

AI Explanation

To answer this question, you need to understand the concept of method overloading.

Method overloading is the ability to define multiple methods with the same name but with different parameters. This allows you to perform different operations based on the arguments passed to the method.

Let's go through each option to understand why it is correct or incorrect:

Option A) Loading - This option is incorrect. "Loading" is not the term used to describe defining two methods with the same name but with different parameters.

Option B) Overloading - This option is correct. Method overloading is the term used to describe defining two methods with the same name but with different parameters.

Option C) Multiplexing - This option is incorrect. "Multiplexing" refers to combining multiple signals into a single channel.

Option D) Duplexing - This option is incorrect. "Duplexing" refers to the ability of a communication system to transmit and receive data simultaneously.

The correct answer is B) Overloading. This option is correct because it accurately describes the concept of defining two methods with the same name but with different parameters.

Find more quizzes: