Java Classes Question:
The type of data returned by a method need not be compatible with the return type specified by the method
A) True
B) False

Answer:
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
A) its False
The return type must be compatible
A) its False
The return type must be compatible
Previous Question | Next Question |
A stack stores data using first-in, last-out ordering. A) True B) False | This can be used inside any method to refer to the current object A) True B) False |