Here you can find the source of maxLength(List
public static int maxLength(List<char[]> patterns)
//package com.java2s; //License from project: LGPL import java.util.List; public class Main { public static int maxLength(List<char[]> patterns) { int len = Integer.MIN_VALUE; for (char[] pattern : patterns) { if (pattern.length > len) { len = pattern.length;/*from w ww. j a v a 2 s .c o m*/ } } return len; } }