Here you can find the source of between(int value, int min, int max)
Parameter | Description |
---|---|
value | a parameter |
min | a parameter |
max | a parameter |
public static boolean between(int value, int min, int max)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w w w . j ava 2s . co m*/ * Checks if value is (inclusively) between min and max. * * @param value * @param min * @param max * @return */ public static boolean between(int value, int min, int max) { return value >= min && value <= max; } /** * @param value * @param min * @param max */ public static boolean between(double value, double min, double max) { return value >= min && value <= max; } }