Here you can find the source of sumElems(boolean[] inputRow)
static public int sumElems(boolean[] inputRow)
//package com.java2s; //License from project: Open Source License public class Main { static public int sumElems(boolean[] inputRow) { int r = 0; for (boolean b : inputRow) { if (b) r += 1;/*from w w w . java 2s . co m*/ } return r; } }