No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
3 Posted Topics
Re: i see two issues: 1) First u r calling listRoots, tht must print C:\ 2) Secondly, u r not trying to get the iterate through the list of files that u got... Let see ur code: File[] filesOnComputer = File.listRoots(); this part shall give u the root of the directory … | |
Re: Hope this helps: package testFiles; import java.util.*; import java.text.SimpleDateFormat; import java.text.DateFormat; public class DayName { public static void main(String[] args) { Date date1 = (new GregorianCalendar (1984, Calendar.FEBRUARY, 13)).getTime(); DateFormat f = new SimpleDateFormat("EEEE"); try { System.out.println ("1984-3-13 was a " + f.format(date1)); } catch(Exception e) { e.printStackTrace(); } } … | |
Re: U must get the File object from the arraylist and then carry out any other operation on them. Somethg like this: for(int i=0; i<arrayList.size();i++){ File n= (File)arrayList.get(i); System.out.println(n.length()); } Hope this helps |
The End.