Android examples for java.lang:Array Element
get Array Dimension
//package com.java2s; public class Main { public static int getArrayDimension(Object objects) { int dim = 0; for (int i = 0; i < objects.toString().length(); ++i) { if (objects.toString().charAt(i) == '[') { ++dim;/*w w w . j a v a 2 s . c o m*/ } else { break; } } return dim; } }