+ 1
Now I found it thanks Qyther and Gami
make it correct https://code.sololearn.com/cMQ7tVsdTiCu/?ref=app
2 Antworten
+ 3
Your errors are on lines 3 and 4. a and b are not passed in the functions. Make sure you include parameters in the function definition:
public static void horn(int a, int b)
For the function to work, you need values for a and b, which are called arguments. To do that change line 13 to:
Vehicle.horn(a, b)
+ 2
initialize variables
public static void horn() {
int a = 0;
int b = 0;
a =a+1;
b =b*2;
System.out.println(a+" "+" "+b);
}