+ 1

Now I found it thanks Qyther and Gami

make it correct https://code.sololearn.com/cMQ7tVsdTiCu/?ref=app

17th Aug 2018, 1:42 PM
Vishal gupta
Vishal gupta - avatar
2 Answers
+ 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)
17th Aug 2018, 1:54 PM
Gami
Gami - avatar
+ 2
initialize variables public static void horn() { int a = 0; int b = 0; a =a+1; b =b*2; System.out.println(a+" "+" "+b); }
17th Aug 2018, 1:55 PM
Mayur Shedage
Mayur Shedage - avatar