Given:1. class Test {2. public static void main(String args[]) {3. int num1 = 10, num2 = 20, result;4. result = calc(num

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

Given:1. class Test {2. public static void main(String args[]) {3. int num1 = 10, num2 = 20, result;4. result = calc(num

Post by answerhappygod »

Given:1. class Test {2. public static void main(String args[]) {3. int num1 = 10, num2 = 20, result;4. result = calc(num1, num2);5. System.out.println(result);6. }7.8. // insert code here9. }Which, inserted at line 8, produces the output 30?

A. static int calc(int n1, int n2) { return; }
B. public int calc(int n1, int n2) { return n1 + n2; }
C. public int calc(int n1, int n2) { return; }
D. static int calc(int n1, int n2) { return n1 + n2; } E. static void calc(n1, n2) { return (n1 + n2); } F. static int calc(int n1, n2) { return n1, n2; };
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This question has been solved and has 1 reply.

You must be registered to view answers and replies in this topic. Registration is free.


Register Login
 
Post Reply