Here you can find the source of length(Object anArray[])
public static int length(Object anArray[])
//package com.java2s; public class Main { /**/*from w w w . j av a 2 s . c o m*/ * Returns the length of a given object array (or zero, if null). */ public static int length(Object anArray[]) { return anArray != null ? anArray.length : 0; } }