Solved

Consider the Following Code Snippet

Question 45

Multiple Choice

Consider the following code snippet:
Public class Employee
{
Private String empID;
Private boolean hourly;
Public Employee()
{
}
) . .
}
Which statement reflects the action performed when the constructor to Employee is called?


A) The variable empID will be initialized to "" and the variable hourly will be initialized to false.
B) The variable empID will be initialized to "null" and the variable hourly will be initialized to true.
C) The variable empID will not be initialized but the variable hourly will be initialized to false.
D) The variable empID will be initialized to null and the variable hourly will be initialized to false.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents