logo Practice-It logo

parameter mystery

Author: Marty Stepp (on 2010/12/28)

Given the following program:

public class ParameterMystery {
    public static void main(String[] args) {
        int one = 4;
        int two = 3;
        int three = 10;
        int num = 17;
        int four = 3;
                                
        racket(one, two, three);
        racket(three, four, 5);
        racket(2, two * 2, num);
        racket(num, three * one, four);
        racket(three - four, one, two);
    }
                
    public static void racket(int two, int one, int three) {
        System.out.println(three + " is roughly " + two + " plus " + one); 
    }
}

Write the output of each of the following calls, as it would appear on the console.

racket(one, two, three);
racket(three, four, 5);
racket(2, two * 2, num);
racket(num, three * one, four);
racket(three - four, one, two);

You must log in before you can solve this problem.


Log In

If you do not understand how to solve a problem or why your solution doesn't work, please contact your TA or instructor.
If something seems wrong with the site (errors, slow performance, incorrect problems/tests, etc.), please

Is there a problem? Contact a site administrator.