120,117 views
2 votes
2 votes
I am getting two expected errors on this code for the bottom two “public static void” lines. Can someone tell me how I can fix it? Thanks

I am getting two expected errors on this code for the bottom two “public static void-example-1
User Ruzihm
by
2.9k points

1 Answer

19 votes
19 votes

Answer:

Declare variable b in both lines

i.e. int b

Step-by-step explanation:

In the given code, the parameters of both functions were not properly declared.

When listing the parameters, the data type must be clearly stated for all parameters (individually)

In the declaration of both functions, only variable a is declared as integer while b is undeclared.

So, the correction is to declare b as integer

User Michael Katkov
by
3.0k points