Write a method called maxOfTwo that accepts two integer parameters and returns the larger of the two.

What will be an ideal response?


```
public int maxOfTwo(int num1, int num2)
{
int result = num1;

if (num2 > num1)
result = num2;

return result;
}
```
Note that the method Math.max also performs this function.

Computer Science & Information Technology

You might also like to view...

____________________ formatting allows the developer to add formatting features such as color, bold, or larger fonts based on the values in the report.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Which of the following statements a), b) and c) is false.

a. Python’s type built-in function determines a value’s type. b. A function performs its task when you call it by writing its name, followed by square brackets, []. c. The parentheses after a function name in a function call contain the function’s argument—the data that the type function needs to perform its task. d. All of the above statements are true.

Computer Science & Information Technology

The file type ____ is a Word 2011 document.

A. .doc B. .docx C. .dot D. .doct

Computer Science & Information Technology

What do you do if you make a mistake when running a Find Unmatched query?

A) Delete associated records in the table. B) Delete the query and start over, then reverse the order of the tables. C) Rerun the query using different fields. D) Modify the aggregate function.

Computer Science & Information Technology