(New page: <source lang="java"> public static String[] convertObjectArrayToStringArray(Object[] objArray) { int len = objArray.length; String[] strArray = new String[len]; System.arraycopy(obj...) |
|||
Line 1: | Line 1: | ||
<source lang="java"> | <source lang="java"> | ||
− | + | public static String[] convertObjectArrayToStringArray(Object[] objArray) { | |
− | + | int len = objArray.length; | |
− | + | String[] strArray = new String[len]; | |
− | + | System.arraycopy(objArray, 0, strArray, 0, len); | |
− | + | return strArray; | |
− | + | } | |
</source> | </source> | ||
+ | |||
+ | |||
+ | [[JavaHowTo|Back to JavaHowTo]] |
Latest revision as of 03:57, 23 November 2010
public static String[] convertObjectArrayToStringArray(Object[] objArray) { int len = objArray.length; String[] strArray = new String[len]; System.arraycopy(objArray, 0, strArray, 0, len); return strArray; }