No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
[code] import java.io.*; import java.util.*; public class MainTwo { public static void main(String[] args) { for(File file : File.listRoots()){ search(file); } } public static void search(File f) { ArrayList<File> arrayList = new ArrayList<File>(); f.listFiles(); arrayList.add(f); System.out.println (f.getName()); } } [/code] Why does it print nothing? |
|
Re:
i want java code which find a day of a given date...eg......13 feb 1984(given date).........answer is monday... |
|
Re:
ArrayList arrayList = new ArrayList(); for (File g : f.listFiles()) if (g.isFile()) { arrayList.add(g); } I hope from the code above you can understand what Im trying to do. If a file is a file then add it to an arraylist. I dont know if this is the best one, … |