public class Filesamp {
public static void main(String a[])
{
File myFolder = new File("C:/Users/kiran/
File afile[];
intj = (afile = myFolder.listFiles()).length;
for(int i = 0; i < j; i++)
{
File fileEntry = afile[i];
String fileName = fileEntry.getName();
System.out.println(fileName);
}
}
}
You can get step by step detail for any java related question.pl visit http://guruzon.com/1/oop-concepts and start with basics oop concepts
ReplyDelete