Examlex

Solved

Consider the Following Code Snippet

question 82

Multiple Choice

Consider the following code snippet. What is the potential problem with the if statement?
Double average;
Average = (g1 + g2 + g3 + g4) / 4.0;
If (average == 90.0)
{
System.out.println("You earned an A in the class!") ;
}


Definitions:

State Legislation

Laws and regulations enacted by the legislative bodies of individual states within a federal system, as opposed to federal legislation which is enacted by the national government.

Legal Violations

Acts or omissions that breach the law, subjecting the violator to legal sanctions, penalties, or legal proceedings.

Wrongdoing

Actions or behaviors that are illegal, unethical, or morally incorrect.

Current Law

The body of law that is in effect at the present time, governing contemporary legal issues and society.

Related Questions