
/**
 * Title:        Chapter 4, "Methods"
 * Description:  Examples for Chapter 4
 * Copyright:    Copyright (c) 2000
 * Company:      Armstrong Atlantic State University
 * @author Y. Daniel Liang
 * @version 1.0
 */

// TestMax.java: demonstrate using the max method
package chapter4;

public class TestMax
{
  /**Main method*/
  public static void main(String[] args)
  {
    int i = 5;
    int j = 2;
    int k = max(i, j);
    System.out.println("The maximum between " + i +
      " and " + j + " is " + k);
  }

  /**A method for finding a max between two numbers*/
  static int max(int num1, int num2)
  {
    if (num1 > num2)
      return num1;
    else
      return num2;
  }
}