 Let's write a program to solve this problem. Which combination of quantity, price, and discount is cheaper? Here's the code with the method named getTotal to calculate the total price, and a main method that calls getTotal. What really happens when we call methods in Java? We start in the main method, and Java allocates memory for variable amount1. Every time Java starts a method, it creates a stack activation record that keeps track of the method's variables. Java then has to evaluate the right hand side of the equal sign. This requires a call to getTotal. That call creates a new activation record that gets stacked on top of the record for main, sort of like a stack of building blocks. GetTotal allocates space for the three parameters, and the three arguments, 12, 3.5, and 7.5, get copied into those parameters. We then calculate the total, and then get to the return statement, which does two things. It takes the methods activation record off the stack, and sends the return value back to the method that made the call. Now that we have the value of the right hand side, we can assign it to amount1. Continuing on in main, we allocate room for variable amount2, and on the right hand side, there's another call to getTotal. Java once again creates an activation record for getTotal, and stacks it on top of mains. It allocates room for the parameters, and copies the argument values, 14, 3.05, and 9.25, into the parameters. We again calculate the total using these different numbers, and get to return, which removes getTotal's activation record from the stack, and sends the total of 38.75 back to the caller, where it gets assigned to amount2. And that's what happens behind the scenes in a Java method call.