0

How do I debug this?

// This application displays some math facts public class DebugThree2 { public static void main(String args[]) { int a = 2, b = 5, c = 10; add(a, b); add(b, c); subtract(c, a); } public static void add(int a, b) { System.out.println("The sum of " + a + " and " + a + " is " + (a + b)); } public static void subtract(int a, b) { System.out.println("The difference between + a + " and " + b + " is " + (a * b)); } }

18th Dec 2021, 1:24 AM
Akon C
Akon C - avatar
1 Resposta
+ 3
Didn't specify the type of argument b: public static void add(int a, b) public static void subtract(int a, b) Didn't close quotes: System.out.println("The difference between 👈+ a + " and " + b + " is " + (a * b));
18th Dec 2021, 1:38 AM
Solo
Solo - avatar