Here you can find the source of toArray(E[] o)
public static <E extends Enum<?>> String[] toArray(E[] o)
//package com.java2s; //License from project: Open Source License public class Main { public static <E extends Enum<?>> String[] toArray(E[] o) { String[] output = new String[o.length]; for (int i = 0; i < output.length; i++) output[i] = o[i].name();/* w w w . j ava 2s . com*/ return output; } }