Here you can find the source of length(int[] tail)
private static int length(int[] tail)
//package com.java2s; //License from project: Apache License public class Main { private static int length(int[] tail) { int product = 1; for (int aTail : tail) { product *= aTail;/* ww w. ja v a 2 s . co m*/ } return product; } }