Can the object type of an argument in the call to a method be difference from the object type of the corresponding formal parameter? Explain.

What will be an ideal response?


Yes, the two object types can be different. The object type of an argument in a call to a method can be a subclass of the corresponding formal parameter’s object type.

Computer Science & Information Technology

You might also like to view...

What is the “Big O” an example of?

a. Algorithm complexity notation b. Sorting algorithm c. Data structure d. String matching algorithm

Computer Science & Information Technology

An algorithm that uses the exact same Python code run on two different machines should have the same performance data.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The ability to manage information is the mark of a successful systems analyst and an important skill for all IT professionals.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Suppose str = "ABCDEFGHI". The output of the statementcout << str.length() << endl; is ____.

A. 7 B. 8 C. 9 D. 10

Computer Science & Information Technology