get minimum int from three int value - Java java.lang

Java examples for java.lang:int

Description

get minimum int from three int value

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int a = 2;
        int b = 2;
        int c = 2;
        System.out.println(min(a, b, c));
    }//w  w  w .  j  a v a  2 s  .com

    protected static int min(int a, int b, int c) {
        return (Math.min(Math.min(a, b), c));
    }
}

Related Tutorials