39.0k views
5 votes
Which of the following method headings uses proper parameter declarations?

a. public static void guess(double rate, double hours, int deductions);
b. public static void guess(7.85, 42.5, 3);
c. public static void guess(double rate, hours, int deductions);
d. public static void guess(rate, hours, deductions);

User Aqingsao
by
8.8k points

1 Answer

4 votes

Final answer:

The correct method heading with proper parameter declarations is 'a. public static void guess(double rate, double hours, int deductions);', stating the data types before the variable names.

Step-by-step explanation:

The method heading that uses proper parameter declarations is: a. public static void guess(double rate, double hours, int deductions);

This heading correctly declares the data types for each parameter: 'rate' and 'hours' as double, and 'deductions' as int. Proper syntax in method declarations includes the data type followed by the variable name for each parameter.

User Tyler Petrochko
by
8.6k points