Consider the following program. public class Mystery { public static void main(String[] args) { String x =
Fantastic news! We've Found the answer you've been seeking!
Question:
Consider the following program.
public class Mystery {
public static void main(String[] args) {
String x = "lemonade";
String y = "ants";
String z = "picnic";
String picnic = "y";
String ants = x + picnic;
picnic(x, y, z);
picnic(y, picnic, "ants");
picnic(y + z, y + picnic, ants);
picnic = "sunny";
picnic(picnic, "today", x);
}
public static void picnic(String z, String y, String x) {
System.out.println(x + " and " + z + " like " + y);
}
}
the output produced by this program.
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date: