Find the error(s) in the following code, which should take an int value as an argument and return the value of that argument multiplied by 2.5. The value returned should be a double.
```
1 private int timesTwo( number )
2 {
3 double result;
4
5 result = number * 2.5;
6
7 } // end method timesTwo
```
There are 3 errors. The first error is that the return type is specified as int (line 1) when it should be specified as double. The second error is that no type is specified for the parameter. The third error is that there is no return statement. The correct code is displayed below.
You might also like to view...
You can password protect a file by using ________ settings
Fill in the blank(s) with correct word
________ checks documents for macros and digital signatures
A) The Expression Builder B) The Validation rule C) The Trust Center D) Data validation
The text box control displays ________ when the control is not linked to a field
Fill in the blank(s) with correct word
If you would like to include a mathematical equation in a report, you would include a(n) ________
Fill in the blank(s) with correct word