Solved

If You Have Defined a Class Named SavingsAccount with a Public

Question 43

Multiple Choice

If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsAccount object referenced by the variable account20, which of the following will assign numberOfAccounts to numAccounts?


A) numAccounts = account20.numAccounts;
B) numAccounts = numberOfAccounts;
C) numAccounts = SavingsAccount.numberOfAccounts;
D) None of the above, you cannot reference a static data member.

Correct Answer:

verifed

Verified

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

Related Questions