Examlex

Solved

Your Program Uses a Map Structure to Store a Number

question 84

Multiple Choice

Your program uses a Map structure to store a number of user ids and corresponding email addresses. Although each user must have a unique id, two or more users can share the same email address. Select an appropriate expression to complete the method below, which adds a new id and email address to the map only if the id is not already in use. If the id is already in use, an error message is printed. public static void addUserID(Map<String, String> users, String id, String email)
{
String currentEmail = users.get(id) ;
If (___________________)
{
Users.put(id, email) ;
}
Else
{
System.out.println(id + " is already in use.") ;
}
}


Definitions:

Taxable Income

The amount of an individual's or corporation's income used to determine how much tax is owed to the government.

Marginal Tax Rate

The percentage of tax applied to your income for every tax bracket in which you qualify.

Average Tax Rate

The fraction of an individual's total income that is paid in taxes, calculated by dividing the total taxes paid by total income.

Taxable Income

the amount of income used to determine how much tax an individual or a company owes to the government, after deductions and exemptions.

Related Questions