Solved

Parameter Mystery At the Bottom of the Page, Write the Output Produced

Question 3

Essay

Parameter Mystery
At the bottom of the page, write the output produced by the following program.
public class ParameterMystery {
public static void main(String[] args) {
String x = "happy";
String y = "pumpkin";
String z = "orange";
String pumpkin = "sleepy";
String orange = "vampire";
orange(y, x, z);
orange(x, z, y);
orange(pumpkin, z, "y");
z = "green";
orange("x", "pumpkin", z);
orange(y, z, orange);
}
public static void orange(String z, String y, String x) {
System.out.println(y + " and " + z + " were " + x);
}
}

Correct Answer:

verifed

Verified

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents