Question: 10. In the following code, correct any errors that would prevent the program from compiling or running and write output. Points 5 package javaapplication 240
10. In the following code, correct any errors that would prevent the program from compiling or running and write output. Points 5 package javaapplication 240 ; public class JavaApplication 240 \& public static void main(StringIl args) \& int total, x=20,y=40 total=sum(x,y) System.out.println("sum ="+ total); public static void sum (int num1, int num2) // not allowed to change \{ intresult;result=num1+num2; return result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
