/**
 * Demonstrating Pass By Value with a primitive type.
 * Trace through the code and understand the output.
 * @author CSCI209
 */
public class ParameterPassingDemo1 {
    
    public static void main(String[] args) {
        int x = 10;
        int squared = square(x);
        System.out.println("The square of " + x + " is " +     squared);
    }

    /**
     * num copies the value of the parameter passed into the method
     */
    public static int square(int num) {
        return num*=num;
    }
}