- 1

b. Assign values to the variables. c. Pass both variables to methods named sum() and difference().

Create a Java program called Numbers with the following specifications.

29th Sep 2022, 10:43 AM
Dumpxz
1 Answer
+ 1
public class Numbers { public static void main (String[] args) { int a = 20; int b = 10; sum(a, b); difference(a, b); } public static int sum(int a, int b) { return a + b; } public static int difference(int a, int b) { return a - b; } }
30th Oct 2022, 10:41 AM
Evseev Anton
Evseev Anton - avatar