The type of data returned by a method need not be compatible with the return type specified by the method

A) True
B) False
Explanation: The type of data returned by a method must be compatible with the return type specified by the method. For example, if the return type of some method is boolean, you could not return an integer

Showing Answers 1 - 7 of 7 Answers

pdurbha

  • Apr 30th, 2006
 

The return type of a method must be compatible with the return type specified by the method. For e.g: The return type specified could be long and the return could be int(since int can be stored in a long)..but not vice-versa.

Praveen.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions