Here you can find the source of sumMinMax(int a, int b)
public static int sumMinMax(int a, int b)
//package com.java2s; /*/*from ww w . ja v a 2s . co m*/ * Theme Builder for ExtJS framework Project. * * Copyright (c) 2009 - 2011 Sergey Chentsov. All rights reserved. * * License: LGPL_v3 * Author: Sergey Chentsov (extjs id: iv_ekker) * mailto: sergchentsov@gmail.com */ public class Main { public static int sumMinMax(int a, int b) { int localSum = a + b; return localSum < 0 ? 0 : (localSum > 255 ? 255 : localSum); } }