Learning Java Programming Made Easy
Here is an example program to get the list of all file/directory names from the given link...
Please try this by your self and learn..
import java.io.File; import java.util.Date; public class Exercise1 { public static void main(String a[]) { File file = new File("/home/students/"); String[] fileList = file.list(); for(String name:fileList){ System.out.println(name); } } }
Here is an example program to get the list of all file/directory names from the given link...
Please try this by your self and learn..
import java.io.File; import java.util.Date; public class Exercise1 { public static void main(String a[]) { File file = new File("/home/students/"); String[] fileList = file.list(); for(String name:fileList){ System.out.println(name); } } }
No comments:
Post a Comment
Welcome, happy learning