Which of the following is incorrect?

a. A constructor may be static.
b. A constructor may be private.
c. A constructor may invoke a static method.
d. A constructor may invoke an overloaded constructor.
e. A constructor invokes its superclass no-arg constructor by default if a constructor does not invoke an overloaded constructor or its superclass’s constructor.


a. A constructor may be static.
A constructor cannot be static, because you use a constructor to create a specific instance. A constructor may be private. In this case, the use cannot create an instance using this constructor. For example, the constructor in the Math class is private. A constructor may invoke a static method just like any method can invoke a static method. A constructor can invoke an overloaded constructor using the this keyword. So, the correct answer is A.

Computer Science & Information Technology

You might also like to view...

For the following template declaration of the following function,

``` template void problem_6 (T object); ``` a) Give a statement that causes the compiler to generate a function that passes int values to the function problem_6 b) Give an equivalent function declaration (prototype) for the function generated by this usage

Computer Science & Information Technology

RAM is volatile, meaning that When the power goes off, RAM is cleared.

Indicate whether the statement is true or false.

Computer Science & Information Technology

?

A. ?In a private-sector environment, the person who has the right to request an investigation, such as the chief security officer or chief intelligence officer B. The file where the bit-stream copy is stored C. A professional who secures digital evidence at the scene and ensures its viability while transporting it to the lab D. ?An expert who analyzes digital evidence and determines whether additional specialists are needed E. ?Evidence that indicates a suspect is guilty of the crime with which he or she is charged F. ?The order in which people or positions are notified of a problem; these people or positions have the legal right to initiate an investigation, take possession of evidence, and have access to evidence G. ?The legal act of acquiring evidence for an investigation H. ?A form that dedicates a page for each item retrieved for a case; it allows investigators to add more detail about exactly what was done to the evidence each time it was taken from the storage locker I. The decision returned by a jury J. ?Text displayed on computer screens when people log on to a company computer; this text states ownership of the computer and specifies appropriate use of the machine or Internet access

Computer Science & Information Technology

The only form of addressing for branch instructions is _________ addressing.

A. register B. relative C. base D. immediate

Computer Science & Information Technology