Java Number Max Value max(byte value1, byte value2)

Here you can find the source of max(byte value1, byte value2)

Description

Gets the maximum byte value from two values

License

Open Source License

Parameter

Parameter Description
value1 a parameter
value2 a parameter

Return

the maximum value

Declaration

public static byte max(byte value1, byte value2) 

Method Source Code

//package com.java2s;
/* Copyright (C) 2011 Garrett Fleenor
    //  w  w w .  j av a  2 s  .  c o m
 This library is free software; you can redistribute it and/or modify it
 under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation; either version 3.0 of the License, or (at
 your option) any later version.
    
 This library is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 License (COPYING.txt) for more details.
    
 You should have received a copy of the GNU Lesser General Public License
 along with this library; if not, write to the Free Software Foundation,
 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    
 This file relicensed with permission from the Spout Project (www.github.com/SpoutDev)
    
 */

public class Main {
    /**
     * Gets the maximum byte value from two values
     * 
     * @param value1
     * @param value2
     * @return the maximum value
     */
    public static byte max(byte value1, byte value2) {
        return value1 > value2 ? value1 : value2;
    }
}

Related

  1. max(byte value, byte max)
  2. max(double a, double b)
  3. max(double a, double b)
  4. max(double a, double b)
  5. max(double a, double b, double c, double d)