Question: Eight(8) errors have occurred while running the following methods. Correct the error to generate the following output. Explain how to correct it. Note: You should

Eight(8) errors have occurred while running the following methods. Correct the error to generate the following output. Explain how to correct it. Note: You should not change anything on line # 21. (15points) 13 public static void sum(a, b) { 14 return a+b; 15 } 16 17 public static void main(String[] args) { 18 a = 1; 19 b = 2; 20 result-sum(int a, int b); 21 System.out.println(result); 22 } // output 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
