162k views
3 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 Hervian
by
4.9k points

1 Answer

4 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 Tony Cheetham
by
5.3k points