Java tutorial
//package com.java2s; public class Main { private static char getType(Object object) { if (isArray(object)) { String str = object.toString(); return str.substring(str.lastIndexOf("[") + 1, str.lastIndexOf("[") + 2).charAt(0); } return 0; } public static boolean isArray(Object object) { return object.getClass().isArray(); } }