String[] is deprecated and ArrayList<String> is used instead