Java Array Max Value maxLength(String... array)

Here you can find the source of maxLength(String... array)

Description

max Length

License

Open Source License

Declaration

public static int maxLength(String... array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int maxLength(String... array) {
        int i = 0;
        for (String s : array)
            if (s.length() > i)
                i = s.length();// ww w  .java2 s  .  c om
        return i;
    }

    public static int maxLength(double[]... array) {
        int i = 0;
        for (double[] a : array)
            if (a.length > i)
                i = a.length;
        return i;
    }

    public static int maxLength(int[]... array) {
        int i = 0;
        for (int[] a : array)
            if (a.length > i)
                i = a.length;
        return i;
    }

    public static int maxLength(int[][]... array) {
        int i = 0;
        for (int[][] a : array)
            for (int[] b : a)
                if (b.length > i)
                    i = b.length;
        return i;
    }
}

Related

  1. maxIndices(double[] aArray, Integer[] indices)
  2. maxIndices(int values[])
  3. maxInt(int... values)
  4. maxInVector(double[] _vector)
  5. maxJoinArray(float[] array1, float[] array2)
  6. maxLikelihood(int[] i, long[] Xi)
  7. maxLimit(int receiver, int... maxBound)
  8. maxLocation(double[] list)
  9. maxNorm(double[] arr)