Question: (JAVA) Parameter Mystery At the bottom of the page, write the output produced by the following program, as it would appear on the console. public

(JAVA) Parameter Mystery At the bottom of the page, write the output produced by the following program, as it would appear on the console.

public class ParameterMystery {

public static void main(String[] args) {

String p = "cause";

String q = "support";

String r = "troops";

String support = "hillary";

String cause = "rudy";

troops(p, q, r);

troops(q, r, p);

troops(support, p, cause);

troops(r, "p", support);

troops(q, "cause", q);

}

public static void troops(String r, String p, String q) {

System.out.println(q + " gave " + r + " to the " + p);

}

}

//For every call fill in the following blanks no extra space between your words. No special characters trace the output as it will appear on console. No capital letters if your code doesn't have it.

Question 6 2 pts

troops(p, q, r);

Flag this Question

Question 7 2 pts

troops(q, r, p);

Flag this Question

Question 8 2 pts

troops(support, p, cause);

Flag this Question

Question 9 2 pts

troops(r, "p", support);

Flag this Question

Question 10 2 pts

troops(q, "cause", q);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!