Here you can find the source of getFilenames(File[] files)
public static String[] getFilenames(File[] files)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.util.ArrayList; public class Main { public static String[] getFilenames(File[] files) { ArrayList<String> result = new ArrayList<String>(); for (File afile : files) { result.add(afile.getAbsolutePath()); }// w ww . j a v a2s . c om return result.toArray(new String[0]); } }