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

1. A constructor is like a function. It can return any type value needed.

2. A constructor usually terminates by falling off the end of its block, but a return statement is permitted if there is no argument add following the word return..

1. False
Explanation: A constructor may not return any value, not even void. There can be no return type in front of the name.
2. True
Explanation: Since a constructor may need to terminate prior to falling off then end, and may need a return statement. However, a constructor cannot return any value whatsoever, so the return can not have an argument.

Computer Science & Information Technology

You might also like to view...

The EBK contains what is recognized to be a coherent and correct set of behaviors based on ____.

A. expert opinion B. expert information C. expert consensus D. expert discussion

Computer Science & Information Technology

The part English part program logic tool used to design a program or part of a program is ____.

A. Flowchart B. Detail design C. Pseudocode D. Structure chart E. Waterfall model

Computer Science & Information Technology