/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package practiceexamchapter6_calebfontenot.methods_test;

/**
 *
 * @author caleb
 */
public class Methods {

    public static int maxOf3(int x, int y, int z)
    {
        if (x > y) {
            if (x > z) {
                return x;
            } else {
                return z;
            }
        } else if (y > z) {
            return y;
        } else {
            return z;
        }

//        return -1;
    }

    public static void printMessage(String message, int howManyTimes) {
        for (int i = 0; i < howManyTimes; ++i) {
            System.out.println(message);
        }
    }
    public static void main(String[] args)
    {
        //printMessage("the good, the bad, and the ugly", 100000);
        System.out.println(maxOf3(3, 2, 1));
        System.out.println(maxOf3(1, 2, 3));
        System.out.println(maxOf3(1, 1, 1));
        System.out.println(Methods.maxOf3(1, 2, 3));
        
    }
}
