I have searched for this, but unfortunately, I don\'t get the correct answer.
class Helper { public static T[] toArray(List list) {
String[] array = list.toArray(new String[0]);